Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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


Comment on Re: print a hash ref
Select or Download Code

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 examining the Monastery: (20)
As of 2015-07-07 21:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls