Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: flip-flop interpolation

by GotToBTru (Prior)
on May 13, 2015 at 18:25 UTC ( #1126581=note: print w/replies, xml ) Need Help??


in reply to flip-flop interpolation

$i = 2; $j = 4; print "$_\n" for ($i..$j);

Output:

2 3 4

Update: I missed what was obvious to choroba. Not so much a flip-flop as a filter:

# show lines 2 thru 4 while (<>) { print if 2..4 } # this will print every line $i = 2; $j = 4; while (<>) { print if $i..$j }
Dum Spiro Spero

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2022-01-16 20:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (49 votes). Check out past polls.

    Notices?