On Wed, Sep 05, 2001 at 04:53:35PM -0400, Ken Hammer wrote:
> $file = `ls file.*.$variable.txt`
> 
> file.*.123456.txt: No such file or directory.

What did you expect to get?  That error is a result of the literal string
"file.*.123456.txt" being passed to ls.  If you're using a shell, as you are
due to the backticks, the only reason that string would get passed to ls is
because there were no matches, or that exact string matched.  Given that the
file doesn't exist, it was the former.

This is typical shell behaviour, and has nothing to do with Perl.  As has
already been mentioned, you should probably use glob() instead of backticks
and ls.

 
Michael
--
Administrator                      www.shoebox.net
Programmer, System Administrator   www.gallanttech.com
--

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to