Oh, it was that simple. Thanks so much, Paul. -Kevin -----Original Message----- From: Paul Johnson [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2008 1:42 PM To: Zembower, Kevin Cc: 'beginners@perl.org' Subject: Re: Why doesn't this work: perl -e "@s=([1,2],[3,4]); print $s[0][0];"
On Fri, Oct 31, 2008 at 01:34:05PM -0400, Zembower, Kevin wrote: > (This should probably be an easy one for someone.} > > Why doesn't this work: > [EMAIL PROTECTED]:/usr/local/src/rrd$ perl -e "@s=(["a","b"],["c","d"]);print > $s[0][0];" > syntax error at -e line 1, near "][" > Execution of -e aborted due to compilation errors. > [EMAIL PROTECTED]:/usr/local/src/rrd$ perl -e "@s=([1,2],[3,4]); print > $s[0][0];" > syntax error at -e line 1, near "][" > Execution of -e aborted due to compilation errors. > [EMAIL PROTECTED]:/usr/local/src/rrd$ > > I'm expecting either an 'a' or a '1'. > > This is almost a character-by-character copy of the top example on page 269 > of the Camel book. What am I overlooking? Tryx using single quotes around the commandline script. -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/