Kevman has asked for the wisdom of the Perl Monks concerning the following question:
Has anyone out there actually got the glob command to work with the move command (in one line)?#!/usr/local/bin/perl -w use strict; use File::Copy; use File::Basename; my @files = glob "/xxx/*.pl"; my $in = "/xxx/"; my $out = "/yyy/"; @files = map { basename($_) } @files; move "$in/$_", "$out/$_" for @files;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Globbing and Moving Together
by wog (Curate) on Jun 29, 2001 at 19:47 UTC | |
by Kevman (Pilgrim) on Jun 29, 2001 at 19:57 UTC | |
by larryk (Friar) on Jun 29, 2001 at 19:49 UTC | |
|
Re: Globbing and Moving Together
by larryk (Friar) on Jun 29, 2001 at 19:45 UTC | |
|
Re: Globbing and Moving Together
by particle (Vicar) on Jun 29, 2001 at 20:11 UTC |