Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Wildcards for a wide array of strings?

by mr_mischief (Monsignor)
on May 24, 2017 at 00:30 UTC ( [id://1191032]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    if ($file = glob(($base)."*.txt")){
       # ...
    }
    
  2. or download this
    #!/usr/bin/perl
    use strict;
    ...
    foreach my $file ( glob qq($base/*.txt)  ) {
        File::Copy::move $file, $dir_for_today  or  warn "Can't move $file
    + to $dir_for_today : $!";
    }
    
  3. or download this
    #!/usr/bin/perl
    use strict;
    ...
    foreach my $file ( glob File::Spec->catfile( $base, '*.txt' ) ) {
        File::Copy::move $file, $dir_for_today  or  warn "Can't move $file
    + to $dir_for_today : $!";
    }
    
  4. or download this
    #!/usr/bin/perl
    use strict;
    ...
    foreach my $file ( glob File::Spec->catfile( source( \%config ), '*' .
    + extension( \%config )  ) ) {
        File::Copy::move $file, $destination  or  warn "Can't move $file t
    +o $destination : $!";
    }
    
  5. or download this
    #!/usr/bin/perl
    use strict;
    ...
    
    print STDERR Mover->new()->move()->warnings();
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2024-04-24 11:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found