in reply to Creating variables while using 'strict'
You can't create global variables when using strict but you can create lexical variables. You do this with 'my'. See Coping with Scoping as well as other entries in the Tutorials section.
Update:BTW, do you have warnings turned on? $$fieldname = ... should have issued a warning with strict turned on.
--- print map { my ($m)=1<<hex($_)&11?' ':''; $m.=substr('AHJPacehklnorstu',hex($_),1) } split //,'2fde0abe76c36c914586c';
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Creating variables while using 'strict'
by blokhead (Monsignor) on Jan 06, 2003 at 03:58 UTC | |
by nedals (Deacon) on Jan 06, 2003 at 06:20 UTC | |
|
Re: Re: Creating variables while using 'strict'
by pg (Canon) on Jan 06, 2003 at 03:52 UTC | |
|
Re: Re: Creating variables while using 'strict'
by broquaint (Abbot) on Jan 06, 2003 at 13:11 UTC |