On Wed, Jul 11, 2001 at 04:26:37PM -0300, Sebadamus wrote:
> Does anybody knows why I cant make this to work as I want? :-)
>
> while (<ARGV> and $_!=~/End of list/)
while (defined($_ = <>) && !/End of list/) {
There are various problems with your original:
- while (<FH>) is the only syntax that assigns to $_ and checks for
definedness for you
- the not-match operator for regexes is !~, i.e. $foo !~ /bar/
- while not really a problem, you should probably go with the more
idiomatic <>, rather than <ARGV>
Michael
--
Administrator www.shoebox.net
Programmer, System Administrator www.gallanttech.com
--