Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^3: Iterate string like, for(1..5) i.e. $stirng="1..5"; for($string)

by GrandFather (Saint)
on Oct 10, 2005 at 01:24 UTC ( [id://498668]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Iterate string like, for(1..5) i.e. $stirng="1..5"; for($string)
in thread Iterate string like, for(1..5) i.e. $stirng="1..5"; for($string)

Do you want something like:

my $range = "2..5,10..15"; my @ranges = eval "($range)";

Perl is Huffman encoded by design.
  • Comment on Re^3: Iterate string like, for(1..5) i.e. $stirng="1..5"; for($string)
  • Download Code

Replies are listed 'Best First'.
Re^4: Iterate string like, for(1..5) i.e. $stirng="1..5"; for($string)
by gman (Friar) on Oct 10, 2005 at 01:39 UTC
    Exactly!!!!
    Thanks! Should I have looked in the docs about eval?

    Thanks again!!!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2024-04-20 10:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found