Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: simple but stuck

by demerphq (Chancellor)
on Apr 25, 2002 at 15:00 UTC ( [id://161981]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #! /usr/local/bin/perl -w
    
    use strict;
    
    open (INPUT, $ARGV[0]) or die "unable to open file";
    
  2. or download this
    my $sequence;
    my $count =0;
    my $base = ("A"|"C"|"G"|"T");
    
  3. or download this
    my @array;
    my $ideal = 250;
    
    while (<INPUT>)
    {
    
  4. or download this
    $sequence = $_;
    
  5. or download this
    @array = ();
    @array = split (/\n/, $sequence);
    
  6. or download this
    while (<>) {
      chomp; # lose potential newlines at the end. (only needed for portab
    +ility)
      print $_,"\n" if length $_ > 250;  # print out any sequence longer t
    +han 250chars
    }
    
  7. or download this
    # find every line over 250 chars from three different files, print the
    +m to STDOUT
    over_250 file.1 file.2 file.3
    # find lines over 250 chars from STDIN
    over_250 <file.1
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-20 01:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found