Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: A complicated file parsing and 2D array/matrix problem.

by zing (Beadle)
on Aug 25, 2012 at 13:10 UTC ( #989723=note: print w/ replies, xml ) Need Help??


in reply to Re: A complicated file parsing and 2D array/matrix problem.
in thread A file parsing and 2D array/matrix problem.

Thanks for suggestions. This is what I have tried, but am not able to go past this.

my $file = "LIST"; open (FH, "< $file") or die "Can't open $file for read: $!"; my @hsa_sub = <FH>; for($x=0;$x<=$#hsa_sub;$x++) { $s=$hsa_sub[$x]; $sline=`cat siper_sub | grep -n $s`; `sed '/substrate/!d; /$s/!d;{n;p}' everything_hsa | grep -i produc +t | awk {'print $2,$3,$4'} >> prodlist` my $fil = "prodlist"; open (FH, "< $fil") or die "Can't open $fil for read: $!"; my @prod.$s.$x = <FH>; }


Comment on Re^2: A complicated file parsing and 2D array/matrix problem.
Download Code
Re^3: A complicated file parsing and 2D array/matrix problem.
by cheekuperl (Monk) on Aug 25, 2012 at 13:28 UTC
    I'd rather not use sed and awk WITHIN a perl program. As far as your problem is concerned, perl would provide all facilities required.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2015-07-05 08:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (61 votes), past polls