Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Section of $string into new array

by Eily (Curate)
on Mar 17, 2014 at 17:56 UTC ( #1078643=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    while (<INPUt>) 
    { 
      push @array, $_;
    }
    
  2. or download this
    while (<INPUT>)
    {
       if (/$pattern/) # matches work by default on $_
    ...
           do something with $_;
       }
    }
    
  3. or download this
    $inner = "([0-5][0-9]|[0-9][1-8])";
    $outer = "$inner.$inner.$inner/[0-6]"; # Can also be written $outer = 
    +join('.', $inner x 3) . "[0-6]"
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2015-07-04 02:12 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 (57 votes), past polls