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

Re: pattern matching to separate data

by graff (Chancellor)
on May 03, 2009 at 23:42 UTC ( #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? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2021-11-30 15:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?