Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] perl hashes




Thanks again to both of you. I've got it working. 
One thing that threw me was there was a hash being passed through many
layers of subroutines, buried in the bottom on the one the created it
was  +AFw-%foo

Brett



On Thu, 18 Sep 2003 16:52:13 +-0900 (JST)
Joe Larabell <larabell@?jp> wrote:

> 
> > but surely the apostrophes aren't required?
> >
> > $qhash_ref->{spam_ch}
> 
> Not if the key is easily identifiable by the parser as what perl likes to
> call a "bare word" (as it is in this case). If you wanted to have spaces
> or punctuation in your key or if you're composing a compound string like
> "$dir/$file.$ext", you need the apostrophes (or, in the compound string
> example, double quotes). And obviously, a single scalar could be put in
> place of the bare word without any quoting, like: $qhash_ref->{$key}.
> 
> --
> Joe Larabell -- Synopsys VCS Support      US: larabell@example.com
> http://wwwin.synopsys.com/+AH4-larabell/   Japan: larabell@?jp
> 
> -- 
> **********************************************************
> TLUG server is hosted by Open Source Development Lab Japan
> http://www.osdl.jp/
> **********************************************************
> 
> To unsubscribe from this mailing list, 
> please see instructions at <http://www.tlug.jp/list.html>
> 

-- 
Brett Robson 
Systems Administrator
GOL 
http://www.gol.com
Phone: 03-3239-6856    International: +-81-3-3239-6856


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links