Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

RE: RE (tilly) 3: each or keys?

by extremely (Priest)
on Oct 11, 2000 at 03:52 UTC ( #36161=note: print w/replies, xml ) Need Help??

in reply to RE (tilly) 3: each or keys?
in thread each or keys?

Ouch, I was aware of the fix that allows 1..1000000 to work, thus I started my post with "And...", I was, however under the impression that  foreach (<FH>) {} was special vs. foreach (<>) {}.

Guess I's been spoilt by dem fancy computairs wif all dat memoree. =) And I never tried to use $. before either, THAT would have made the problem clearer...

#!/usr/bin/perl -w open FH, "</really/huge/file" or die "Eeek, $!\n"; foreach (<FH>) { print "$. - $_"; }

Ow! Every line has the same line number! =)

$you = new YOU;
honk() if $you->love(perl)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://36161]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2021-04-13 00:18 GMT
Find Nodes?
    Voting Booth?

    No recent polls found