On Mon, 19 Aug 2002, John W. Krahn wrote:
> Stephen Turner wrote:
> >
> >
> > Can anyone explain the following? Or is it just one of those Perl quirks
> > that one frequently encounters when playing golf :-) ?
> >
> > % perl -e'@x=(st);print <@x>'
> > st
> >
> > % perl -e'$x="st";print <$x>'
> >
> > % perl -e'%x=(st=>1);print <%x>'
> > %x
>
>
> You mean the fact that $ and @ are interpolated while % isn't or that a
> scalar inside <> is a file handle while an array inside <> is a glob?
>
>
Ah yes, I get it now, thank you. <$x> is a filehandle -- but you can use
<${x}> to force it to be a glob. %x doesn't get interpolated inside double-
quoted strings anyway.
--
Stephen Turner, Cambridge, UK http://homepage.ntlworld.com/adelie/stephen/
"This is Henman's 8th Wimbledon, and he's only lost 7 matches." BBC, 2/Jul/01