Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
thanks :-)#! /usr/local/bin/perl -w use strict; my $num_of_params; my $num_of_params = @ARGV; if ($num_of_params < 3) { die ("not enough params!!!"); } open (INPUT, $ARGV[0]) or die "unable to open file"; open (OUTFILE, ">$ARGV[1]"); my $count = 1; my $line; while (<>) { chomp; $line = $_; if (/>/) { ++$count; } print "\>$count\n", $line, "\n\n" if length $_ >= $ARGV[2]; print OUTFILE"\>$count\n", $line, "\n\n" if length $_ >= $ARGV[2]; } close INPUT; close OUTFILE;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: confused
by davorg (Chancellor) on May 15, 2002 at 14:58 UTC | |
|
Re: confused
by TStanley (Canon) on May 15, 2002 at 15:10 UTC | |
by Biker (Priest) on May 15, 2002 at 15:20 UTC | |
by davorg (Chancellor) on May 15, 2002 at 15:26 UTC | |
|
Re: confused
by Biker (Priest) on May 15, 2002 at 14:57 UTC | |
by davorg (Chancellor) on May 15, 2002 at 15:05 UTC |