Kevin Spencer <ke...@kevinspencer.org> writes:

> On Fri, Feb 10, 2012 at 10:52 AM, Harry Putnam <rea...@newsguy.com> wrote:
>>
>> But these command line attempts fail:
>>
>> (all on one line)
>>  perl  -e 'my ($seven, $nine) =
>>    (stat('./SweetwatterPk-016.jpg'))[7, 9];
>>        print "$seven and $nine"'
>>
>> output:
>>  syntax error at -e line 1, near "stat(."
>>  Search pattern not terminated at -e line 1.
>
> It's the use of single quotes inside your stat() command.  You've
> already opened a single quote after your perl -e statement.  Try
> switching the inner single quotes to double quotes and you'll no
> longer get the syntax error.

Thanks, and yes that works now.  

At least I was kinda sorta on the right track there.  But I should
have thought to try double quotes.


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to