Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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 scrutinizing the Monastery: (10)
As of 2014-10-02 07:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (49 votes), past polls