Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Optimizing existing Perl code (in practise)

by feloniousMonk (Pilgrim)
on Aug 19, 2002 at 18:02 UTC ( #191258=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @a = ();
    if ( $foo =~ /^(\d+)\s+(\w+)\s*$/ ) {
        @a = ($1, $2);
    }
    
  2. or download this
    my @a = split (/\s+/, $foo);
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2019-05-26 13:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you enjoy 3D movies?



    Results (153 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!