Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

(Ovid) Re: regexp's

by Ovid (Cardinal)
on Oct 03, 2000 at 06:20 UTC ( #35039=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
            $somehash{$2} = $1;
        }
    }
    
  2. or download this
    /^            # Anchor to beginning of string
      (           # Capture to $1
    ...
        [a-zA-Z]+ #     One or more letters
      )           #
    $/x;          # Anchor to end of string
    
  3. or download this
    while (<FILE>) {
        chomp;
        my ($value, $key) = (split /\s/, $_)[0,3];
        $somehash{$key}   = $value;
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2022-08-08 13:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?