in reply to Using with a variable

I believe that using <$var> makes perl try to read the filehandle named (contents of $var) if $var is a string, or the file $var points to if $var is a filehandle (i.e. $var=new IO::File("FileThingy");) .

(Win32 examples; swap " and ' to use on Unix, and use ^D instead of ^Z)

D:\>perl -e"$x='STDIN'; print <$x>;"
abc
def
^Z
abc
def
d:\>copy con abc
asd
dsa
zxc
^Z
d:\>perl -MIO::File -e"$x=new IO::File('abc'); print <$x>"
asd
dsa
zxc

What you want is a glob; in this case, you're better off using the function notation for glob,

unlink glob($Pattern);
Hope this helps...