On Thu, Aug 02, 2001 at 11:03:23AM -0700, Jon wrote:
> My problem is, I want to do this for a bunch of different patterns (ex. 
> ".txt", ".this", ".that").

You could say <*.txt *.this *.that>, or you can use opendir, readdir, and a
regex (perhaps grep).


> How can I make what is inside the angle brackets a variable?

You don't, it can confuse Perl and users having to look at your code.  Use
glob() instead of angle brackets, in this case.

    $pats = "*.txt *.this *.that";
    print join("\n", glob($pats);


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