Re: about glob

2010-12-16 Thread Rob Dixon
On 16/12/2010 13:57, practicalperl wrote: On Thu, Dec 16, 2010 at 9:47 PM, C.DeRykus wrote: There weren't any matches with files and no wildcards in the glob pattern so the pattern itself is returned *. If there had been a wildcard in the pattern, then nothing would have been returned. Th

Re: about glob

2010-12-16 Thread practicalperl
On Thu, Dec 16, 2010 at 9:47 PM, C.DeRykus wrote: > There weren't any  matches with files and no wildcards > in the glob pattern so the pattern itself is returned *.  If > there had been a wildcard in the pattern, then nothing > would have been returned. > Thanks. But still being confused about

Re: about glob

2010-12-16 Thread C.DeRykus
On Dec 16, 2:56 am, practicalp...@gmail.com (practicalperl) wrote: > This has been confused me: > > [an...@localhost tmp]$ ls > [an...@localhost tmp]$ perl -le'print glob("foo.3")' > foo.3 > > there is nothing in the tmp directory. > but why glob("foo.3") returns the string? > > $ perl -v > > This

about glob

2010-12-16 Thread practicalperl
This has been confused me: [an...@localhost tmp]$ ls [an...@localhost tmp]$ perl -le'print glob("foo.3")' foo.3 there is nothing in the tmp directory. but why glob("foo.3") returns the string? $ perl -v This is perl, v5.8.8 built for i686-linux Thanks. -- To unsubscribe, e-mail: beginners-u

Re: confusing question about GLOB

2006-03-28 Thread John W. Krahn
Jeff Pang wrote: >>>[EMAIL PROTECTED] coremail]$ perl -le 'our %test = (type => "software"); >>>print ${$::{test}{HASH}}{type}' >>>[ no output ] >>You are trying to print $::{test}->{HASH}->{type} but $::{test} does not >>contain a hash reference. > > Thanks John.Then why can this work?

Re: confusing question about GLOB

2006-03-28 Thread Jeff Pang
>> [EMAIL PROTECTED] coremail]$ perl -le 'our %test = (type => "software"); >> print ${$::{test}{HASH}}{type}' >> [ no output ] > >You are trying to print $::{test}->{HASH}->{type} but $::{test} does not >contain a hash reference. > Thanks John.Then why can this work? $ perl -le 'our

Re: confusing question about GLOB

2006-03-28 Thread John W. Krahn
Jeff Pang wrote: > hello,list, Hello, > See these commands pls: > > [EMAIL PROTECTED] coremail]$ perl -le 'our %test = (type => "software"); > print $::{test}' > *main::test You are printing the value for the key 'test' in the hash %:: (the symbol table; see the "Symbol Tables"

confusing question about GLOB

2006-03-27 Thread Jeff Pang
hello,list, See these commands pls: [EMAIL PROTECTED] coremail]$ perl -le 'our %test = (type => "software"); print $::{test}' *main::test [EMAIL PROTECTED] coremail]$ perl -le 'our %test = (type => "software"); print ${*main::test{HASH}}{type}' software [EMAIL PROTECTED] core