yes, sure... here's the code i am stuck on
#!/usr/bin/perl use File::stat; use File::Basename; $srcdir = "/nfs/spptribu/"; $dstdir = "/trib/oper/temp/sql/eventual/"; $pgmFind="/trib/oper/temp/copiaFind"; open(DATOS,"$pgmFind|"); @datos = <DATOS>; close(DATOS) ; foreach $archivo (sort @datos) { #print "datos:$archivo"; ($perm,$nol,$owner,$group,$size,$mes,$dia,$hora,$filename) = split + (/\s+/, $archivo); $namefile=basename($filename,@suffixlist); $srcfile="$srcdir$namefile"; $dstfile="$dstdir$namefile"; # printf ("Archivo: %s \n\tPermisos: %s \n\tOwner: %s \n\tGroup: %s +\n\tSize: %s \n\tMes: %s Dia: %s Hora: %s\n",$filename, $perm,$owner,$group,$size,$mes,$dia,$hora); print "origen: $srcfile\n"; print "destino: $dstfile\n"; my ($src_dev,$src_ino,$src_mode,$src_nlink,$src_uid,$src_gid,$src_rdev +,$src_size,$src_atime,$src_mtime,$src_ctime,$src_blksiz e,$src_blocks)=stat($_); my ($dst_dev,$dst_ino,$dst_mode,$dst_nlink,$dst_uid,$dst_gid,$dst_rdev +,$dst_size,$dst_atime,$dst_mtime,$dst_ctime,$dst_blksiz e,$dst_blocks)=lstat($dstfile) or die "Cagaste! destino malo"; ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$bl +ksize,$blocks)=stat('/trib/oper/scripts/planesH.s.P370' ); print "$srcfile: $src_mtime $src_size\n"; print "$dstfile: $dst_mtime $dst_size\n"; exit; }
i am trying to get an output similar to an "ls -l $filename" for each of the two files of each of the files in an array of filenames...

In reply to Re^2: File::stats issue by basarix
in thread File::stats issue by basarix

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.