From: sreservoir on
On 1/19/2010 3:32 PM, Peter J. Holzer wrote:
> On 2010-01-19 02:40, sreservoir<sreservoir(a)gmail.com> wrote:
>> ~% perl -wle'print !1'
>> Use of uninitialized value in print at -e line 1.
>
> I suspect that your shell (csh?) is fooling you. If !1 is interpreted as
> a history expansion and command 1 was empty the command really reads:
>
> ~% perl -wle'print '
>
> which will produce the warning you see.

~% echo $SHELL
/bin/csh

gah!

--

"Six by nine. Forty two."
"That's it. That's all there is."
"I always thought something was fundamentally wrong with the universe"
From: sreservoir on
On 1/20/2010 4:34 PM, sreservoir wrote:
> On 1/19/2010 3:32 PM, Peter J. Holzer wrote:
>> On 2010-01-19 02:40, sreservoir<sreservoir(a)gmail.com> wrote:
>>> ~% perl -wle'print !1'
>>> Use of uninitialized value in print at -e line 1.
>>
>> I suspect that your shell (csh?) is fooling you. If !1 is interpreted as
>> a history expansion and command 1 was empty the command really reads:
>>
>> ~% perl -wle'print '
>>
>> which will produce the warning you see.
>
> ~% echo $SHELL
> /bin/csh
>
> gah!
>

in sh:
~% perl -wle'print !1'

~%

--

"Six by nine. Forty two."
"That's it. That's all there is."
"I always thought something was fundamentally wrong with the universe"