Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: What's the best way to do a pattern search like this?

by tachyon (Chancellor)
on Jul 20, 2001 at 10:33 UTC ( [id://98341]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # declare our vars
    my (%codes, @array_codes);
    ...
    ba bababab aaba abab babaa baaba ba baaba. 
    aaba ba bababab ba bababab abab ba aaba abab baaba abab. 
    ba abab abab ba.
    
  2. or download this
    sub count_codes {
      my $file = shift;
    ...
    
    # call sub
    count_codes("/path/to/myfile.txt");
    
  3. or download this
    foreach $code_key (@array_codes) {
      $code_key =~ s/[.]//g;
      $codes{$code_key}++;
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-04-23 06:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found