HI Shlomi, On Wednesday 15 December 2010 11:57:25 Shlomi Fish wrote: [snip] > > > > while (<STDIN>) { > > my $line=$_; > > Why are you doing this instead of: > > [code] > while (my $line = <STDIN>) > { > } > [/code] >
For two reason, (1) I've not written Perl in ages and forgotten much of the style and syntax and (2) I copied the code straight from an example on a perl tutorial page. > I should also note that normall <ARGV> (shortened as <>) is preferable to > <STDIN>. See: > > http://perl-begin.org/tutorials/bad-elements/ > I've read the page, and changed my code accordingly. Thank you. > Regards, > > Shlomi Fish > > > and now it works perfectly. -- Gary Stainburn I.T. Manager Ringways Garages http://www.ringways.co.uk -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/