Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

(Ovid) Re: regexp's

by Ovid (Cardinal)
on Oct 03, 2000 at 06:20 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2024-04-25 02:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found