Can't speak for windows, but I think for linux the brackets are not required. ________________________________ From: Yatin Jadhav <yatinjdhv@...> To:...
27216
Christian Fuchs
agentphreak@...
Oct 31, 2011 4:22 pm
Hi everybody, I just wrote a little script for practising perl.It's a perl rewrite of the tac tool. It does what it should do, but it just doesn't end ;) I can...
27217
Shawn H Corey
shawnhcorey@...
Oct 31, 2011 4:27 pm
... You don't need the while loop. When you read a file handle into an array, the entire stream gets read. It reverses and print the contents. It then goes...
27218
Amish Husain
amishhusain...
Oct 31, 2011 5:11 pm
try this: Â use strict; use warnings; use strict; use warnings; my $lines = <>; $lines = reverse $lines; print $lines; ________________________________ From:...
27219
Shawn H Corey
shawnhcorey@...
Oct 31, 2011 5:30 pm
... Duplicate, not needed. ... Duplicate, not needed. ... This will read only one line, with a newline at the end. ... This will reverse the characters in the...
27220
Amish Husain
amishhusain...
Oct 31, 2011 5:55 pm
right, i just replaced the array with a scalar on ur script. but u made a good point with \n ________________________________ From: Shawn H Corey...
27221
rmillergraysharbor
rmillergrays...
Oct 31, 2011 5:57 pm
After a nice long weekend, I am back trying to cp a file in perl. I am on a Sun Solaris box. Thanks for all of your responses, but still no luck. I've tried 3...
27222
Rajagopal, Jay
kargil_jay
Oct 31, 2011 5:59 pm
Did you chomp? ... From: perl-beginner@yahoogroups.com [mailto:perl-beginner@yahoogroups.com] On Behalf Of rmillergraysharbor Sent: Monday, October 31, 2011...
27223
merlyn@...
merlynstoneh...
Oct 31, 2011 5:59 pm
... Amish> right, i just replaced the array with a scalar on ur script. And broke it. If your help hurts more than it helps, please stop answering. It makes ...
27224
merlyn@...
merlynstoneh...
Oct 31, 2011 6:01 pm
... rmillergraysharbor> my($filename) = `ls -at1 rmillergraysharbor> /sds/ibr/waibrs/submit/SPD/00*`; Why are you using "ls" when Perl is perfectly good at...
27225
Shawn H Corey
shawnhcorey@...
Oct 31, 2011 6:02 pm
... Actually, it's not clear if the OP wanted to reverse the order of the lines in the file or reverse each line but keep the same order. Or perhaps both. We...
27226
Regina Miller
rmillergrays...
Oct 31, 2011 6:15 pm
Because I want the latest one, so I need them in order, not by name, but by datetime. ... From: Randal L. Schwartz [mailto:merlyn@...] Sent: Monday,...
27227
rmillergraysharbor
rmillergrays...
Oct 31, 2011 6:23 pm
That was it! I didn't chomp! Oh, thank you. And thanks to everyone for their help. Regina...
27228
David Precious
bigpresh
Oct 31, 2011 6:32 pm
... Then do so in Perl, in a robust and portable way: my @files_sorted = sort { -M $a <=> -M $b } glob "/sds/ibr/waibrs/submit/SPD/00*"; That will give you the...
27229
David Precious
bigpresh
Oct 31, 2011 6:36 pm
... Yup, the newline from the `ls -at1` output was the reason behind the (fairly clear) error message you received when using File::Copy. Whilst you now have a...
27230
Christian Fuchs
agentphreak@...
Oct 31, 2011 8:02 pm
... Sorry that i hadn't made it clear enough. My purpose is to get the words in the same order as they are, but reversing the lines in which they are printed...
27231
rmillergraysharbor
rmillergrays...
Oct 31, 2011 10:06 pm
Thank you for the advice. And thanks to David Precious for the sample code that is more Perl-specific. I appreciate it. Regina...
27232
timothy adigun
eternity8008
Nov 2, 2011 8:31 pm
Hi Christian ... * *I believe Shawn script will do exactly what you are asking for, however, if you want a one liner without the array variable you could also...
27233
Weder Prado
wederinfra
Nov 4, 2011 9:21 pm
Hi, I am learning perl and I need to create a regexp that extract only the 4 digits after the "-" Below the string: 20111014-18:00:14.474 : 8=FIX.4.2 9=68 35=1...
27234
David Precious
bigpresh
Nov 4, 2011 9:29 pm
... Nearly anything is possible :) What part of the string are you talking about? the "18:00" after the "-"? If not, please provide an example of what you...
27235
Shawn H Corey
shawnhcorey@...
Nov 4, 2011 9:40 pm
... Yes, try: m{ # start of match \- # match a hyphen \D* # skip non-digits (\d) # capture first digit \D* # skip non-digits (\d) # capture...
27236
Yatin Jadhav
yatinjdhv...
Nov 5, 2011 9:03 am
Try this it works........... $a = "20111014-18:00:14.474 : 8=FIX.4.2 9=68 35=1 34=1074 49=FIX13480052=20111014-18:00:14.474 56=BVMF 112=TEST 10=191"; @b =...
27237
timothy adigun
eternity8008
Nov 5, 2011 2:56 pm
Hi Prado, ... output, instead, the output will be 18:0. I suppose you didn't put the *:* into consideration as part of the output, since you are you *split* on...
27238
timothy adigun
eternity8008
Nov 5, 2011 2:58 pm
... output, instead, the output will be 18:0. I suppose you didn't put the *:* into consideration as part of the output, since you are you *split* on the $b[1]...
27239
rookt8zking
Nov 14, 2011 6:32 pm
In the sprintf documentation under topic "Order of Topics", I tried the first two statements (both in the code below). The second did not produce the results...
27240
medura43
Nov 20, 2011 11:51 am
Hi all Not sure if this the right place to ask this question, but can I use perl or perl TK to plot on a web page? If so, can some refer me to resources that...
27241
Shlomi Fish
shlomif2
Nov 20, 2011 12:09 pm
Hi Medura, On Sun, 20 Nov 2011 11:51:15 -0000 ... You can use Perl to do that, but you don't need to use Perl/Tk for that. That's because Tk draws to a local...
27242
Shawn H Corey
shawnhcorey@...
Nov 20, 2011 2:24 pm
... You should use GD::Graph or GD::Graph3d to create PNG files. Both are available from CPAN. -- Just my 0.00000002 million dollars worth, Shawn Programming...
27243
Paul.G
medura43
Nov 21, 2011 11:57 am
Thanks for your help everyone, I have some reading to do. Hopefully, I can have some nice plots on a graph over the next few weeks. cheers ...
27244
Ralph Blach
rcblach@...
Nov 23, 2011 4:22 am
I am using the module Net::SSH::Perl and i have successfully opened a terminal with ssh->shell The only problem is the the shell does not re-size and only...