Brian Raven wrote:

> Any one of the three methods used in the OP's script to expand a
> filename pattern would have been adequate (if used correctly), including
> Autoglob.

Not if you want to pass in a mask.  Autoglob won't let you.

>>>>foreach my $filemask (@ARGV){
>>
>>@ARGV should have been emptied into @filemasks using my method or the
>>global $filemask was unecessary using this method.  Assuming that
>>@filemasks already has the masks from above, you could use something
>>like:   
>>
>>my @myfile;
>>push @myfile, glob $_ foreach (@filemasks);
> 
> 
> This is pretty much what Autoglob does.

Except you don't have a choice since autoglob automatically does
it - you can't control when it does it or on which args.

On UNIX, you could just do 'some/path/*.txt' and get a mask in
instead of expanding the glob.  Autoglob precludes that.
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to