Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: file header change

by Anonymous Monk
on Feb 05, 2013 at 09:50 UTC ( #1017096=note: print w/ replies, xml ) Need Help??


in reply to file header change

may be it's a too simple questions, but I only started to learn perl and got stuck..

Great, show your code


Comment on Re: file header change
Re^2: file header change
by utpalmtbi (Acolyte) on Feb 05, 2013 at 10:17 UTC
    use strict; use warnings; sub read_file { my( $filename ) = <STDIN>; my @lines; sub read_file { my( $filename ) = <STDIN>; my @lines; open( FILE, "< $filename" ) or die "Can't open $filename : $!"; { if( @line =~ />contig_(\d+)\s/ ) { print ">$1\n"; } else { print "$line\n"; } }
Re^2: file header change
by utpalmtbi (Acolyte) on Feb 05, 2013 at 10:20 UTC
    sorry for the previous post:

    use strict; use warnings; sub read_file { my( $filename ) = <STDIN>; my @lines; sub read_file { my( $filename ) = <STDIN>; my @lines; open( FILE, "< $filename" ) or die "Can't open $filename : $!" +; { if( @line =~ />contig_(\d+)\s/ ) { print ">$1\n"; } else { print "$line\n"; } }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (11)
As of 2014-09-30 16:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (377 votes), past polls