Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: print a hash ref

by johngg (Abbot)
on Jul 09, 2013 at 16:53 UTC ( #1043354=note: print w/ replies, xml ) Need Help??


in reply to print a hash ref

next if $. == 35 or $. == 36;

Did you know that you can use the flip-flop with line numbers?

$ perl -Mstrict -Mwarnings -E ' open my $inFH, q{<}, \ <<EOD or die $!; Line 1 Line 2 Line 3 Line 4 Line 5 Line 6 Line 7 EOD while ( <$inFH> ) { next if 3 .. 5; print; }' Line 1 Line 2 Line 6 Line 7 $

Just another bit of Perl shorthand :-)

Cheers,

JohnGG

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (14)
As of 2016-06-27 13:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (337 votes). Check out past polls.