Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

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

by zing (Beadle)
on Sep 05, 2012 at 23:17 UTC ( #991968=note: print w/ replies, xml ) Need Help??


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

Kenosis it was resolved. Im facing another issue. I need to pick list.txt files one by one from each 5 subdirectories(d1,d2,d3,d4,d5) in the present directory. Here's the relevant snippet from the code

#!/usr/bin/perl use strict; use warnings; use List::Util qw/ max /; open my $fh, "<", 'SUPERLIST_PRODUCT' or die $!; my $spr_prod = do {local $/; <$fh>}; close $fh or die $!; my @spr_prod = $spr_prod =~ /\d+/g; open $fh, "<", 'SUPERLIST_SUBSTRATE' or die $!; my $spr_substr = do {local $/; <$fh>}; close $fh or die $!; my @spr_substrate = $spr_substr =~ /\d+/g; my @matrix; my $path = '.'; # (current directory - '.') or path to data files my @file = qw/list.txt/;


Comment on Re^6: A complicated file parsing and 2D array/matrix problem.
Download Code
Re^7: A complicated file parsing and 2D array/matrix problem.
by Kenosis (Priest) on Sep 06, 2012 at 01:31 UTC

    Am glad to hear that it's resolved.

    Since you're "facing another issue," it should be addressed in a new node created for it, so present and future PM browsers can benefit from the dialog.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (14)
As of 2015-07-06 15:29 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 (77 votes), past polls