Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: pattern matching to separate data

by graff (Chancellor)
on May 03, 2009 at 23:42 UTC ( [id://761626]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    while ($line=<FILE>){
    
    ...
            $hit2= $line=~ /^(>data_\d+\s+PROTID_\d+.*\n.*)/s;
            print OUT2 "$hit2\n";
    }
    
  2. or download this
        $str = "text with some pattern in it";
        $c = $str =~ / (some pattern) /;  # sets $c to the numeric value "
    +1"
        @m = $str =~ / (some pattern) /;  # assigns "some pattern" as sole
    + element of @m
        ( $m ) = $str =~ / (some pattern) /; # sets $m to "some pattern"
    

Log In?
Username:
Password:

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

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

    No recent polls found