It would be helpful if you could show a sample of the input file and the required output. Are you trying to load a file into an 2 dimension array like this perhaps ?

#!perl use strict; my $dir = 'C:/CCI/scci_clearcase/'; my $infile = $dir.'temp3_out.txt'; open IN,'<',$infile or die "Could not open $infile : $!"; # Load Metrics table # my @table = (); while (my $line = <IN>) { chomp $line; my ($dum1,$dum2) = split / /,$line,2; my ($i,$j,$k,$l) = split /,/,$dum1,4; my ($product,$date,$hour,$user) = split /,/,$dum2,4; push @table,[$i,$j,$k,$l,$product,$date,$hour,$user]; } close IN; my $outfile = $dir.'temp2_out.txt'; open OUT,'>',$outfile or die "Could not open $outfile : $!"; for my $rec (@table){ my ($i,$j,$k,$l,$product,$date,$hour,$user) = @$rec; print OUT "$i, $j, $k, $l user='$user' mtab='$product $date $hour' + \n"; } close OUT;
poj

In reply to Re: Why am I getting Can't use string (<string value>) as an ARRAY ref wile "strict refs" in use by poj
in thread Why am I getting Can't use string (<string value>) as an ARRAY ref wile "strict refs" in use by 5NOMAD7

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.