Hello,
I need to cp the return values to the "$seqdir"
dir, but nothing is happening. Any ideas?

#!/usr/bin/perl use strict; use DateTime; use File::Copy; use File::Find; use File::stat; use Time::localtime; my $now = DateTime->now(time_zone => 'floating'); my $yesterday = $now->subtract(days=>1); my $year = $yesterday->year; my $month = $yesterday->month; my $month_abbr = uc($yesterday->month_abbr);# uppercase string chars my $day = $yesterday->day; my $year_abbr = substr "$year",2,2; my $mdy = $now->strftime("%m-%d-%y"); print "$year\t$year_abbr\t$month\t$month_abbr\t$day\n"; my $root="/Users/mgavi.brathwaite/Desktop/BioinfDev/SequenceAssemblyPr +oject/Sequencing_Results/RESULTS $year/New Version/Amanda Li/$month_a +bbr "."$year"; print "$root\n"; my $seqdir = "/Users/mgavi.brathwaite/Desktop/BioinfDev/SequenceAssemb +lyProject/testdir1"; mkdir $seqdir, 0755; # I want to use File::stat to determine age of dir # to determine if it is recent. This is a filtering # process to determine which files to process my $seq_files = find(\&wanted, $root); copy("$seq_files","$seqdir") or die "File cannot be copied."; sub wanted { my $targetfile = $File::Find::name; next if $targetfile =~ /xls$/; my $mod_time = (-M $targetfile < 1); print "Found it $targetfile\n" if /^(\d+\D\d)_(LacZ|pgK|SD|SU)/; # skip unless mod date is less than one day ago return if ( (-M $targetfile < 1) && (/^(\d+\D\d)_(LacZ|pgK|SD|SU) +/) ); } print "done\n";

In reply to My filtered list is not being returned for cp by lomSpace

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.