On Dec 19, 2007 7:01 PM, Jenda Krynicky <[EMAIL PROTECTED]> wrote:
snip
> I did not install it yet so I can't check but I think you have it
> wrong. According to the docs you point to
>
>@ARGV ~~ /\.mdb\z/
>
> is equivalent to
>
>grep /\.mdb\z/, @ARGV
>
> which is true whenever at least one
From: "Chas. Owens" <[EMAIL PROTECTED]>
> On Dec 18, 2007 4:49 PM, Rob Dixon <[EMAIL PROTECTED]> wrote:
> snip
> > if (grep { not /\.mdb\z/ } @ARGV) {
> >print "All parameters must be MDB files\n";
> >exit;
> > }
> snip
>
> Or in Perl 5.10, coming to stores near you soon*, you can use the
On Dec 18, 2007 4:49 PM, Rob Dixon <[EMAIL PROTECTED]> wrote:
snip
> if (grep { not /\.mdb\z/ } @ARGV) {
>print "All parameters must be MDB files\n";
>exit;
> }
snip
Or in Perl 5.10, coming to stores near you soon*, you can use the
smart match operator:
@ARGV ~~ /\.mdb\z/
or die "All
goldtech wrote:
Hi,
If I have:
...
foreach (@ARGV) {
print "do something only to .mdb files";
}
I could use File::Basename's fileparse and test for the file extension
and put a big if statement around or in the foreach loop. So if a user
puts a non .mdb file argument on the cmd line it won
On Dec 18, 2007 10:08 PM, goldtech <[EMAIL PROTECTED]> wrote:
> Hi,
>
> If I have:
>
> ...
> foreach (@ARGV) {
>print "do something only to .mdb files";
> }
>
> I could use File::Basename's fileparse and test for the file extension
> and put a big if statement around or in the foreach loop. So