Re: confused with File::Glob

2003-02-09 Thread Rob Dixon
Harry Putnam wrote: > "John W. Krahn" <[EMAIL PROTECTED]> writes: >>> >>> use File::Glob ':glob'; >>^^^ >> Note that the only options available are ':case', ':nocase' and >> ':globally', > > Maybe it recognizes the abbrev or something. Doesn't seem to be > wreaking havoc a

Re: confused with File::Glob

2003-02-09 Thread Harry Putnam
"John W. Krahn" <[EMAIL PROTECTED]> writes: >> cat ./testglob.pl >> #!/usr/local/bin/perl -w >> >> use File::Glob ':glob'; >^^^ > Note that the only options available are ':case', ':nocase' and > ':globally', Maybe it recognizes the abbrev or something. Doesn't seem t

Re: confused with File::Glob

2003-02-08 Thread John W. Krahn
Harry Putnam wrote: > > Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> writes: > > > And || enforces scalar context, so func() won't (can't) return a list, in > > your case. > > Thanks, I'd have been a very long time figuring that out... Another point. > cat ./testglob.pl > #!/usr/local/bin/perl -w

Re: confused with File::Glob

2003-02-08 Thread Harry Putnam
Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> writes: > And || enforces scalar context, so func() won't (can't) return a list, in > your case. Thanks, I'd have been a very long time figuring that out... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: confused with File::Glob

2003-02-08 Thread Jeff 'japhy' Pinyan
On Feb 8, Harry Putnam said: > @files = bsd_glob("$glob_pattern",GLOB_ERR)|| die "Yikes: $!"; This line screws you up. Change the || to 'or'. @files = bsd_glob(...) or die "Yikes: $!"; The reason being: || binds very tightly, and 'or' binds less tightly. With ||, your code is like @file

confused with File::Glob

2003-02-08 Thread Harry Putnam
Apparently I'm not getting what it is that File::Glob is supposed to do: ls tmp/file_[0-9]*|wc -l 99 All 99 look like tmp/file_NUM with incrementing number. Why doesn't this code unwind the list of files? when this command is given: ./testglob.pl 'tmp/file_[0-9]*' cat ./testglob.pl #!/us