2009/12/12 Philip Potter :
> 2009/12/12 Shawn H Corey :
>> Alan Haggai Alavi wrote:
>>> Hi,
>>>
>>> Windows requires you to use double quotes in place of single quotes. Saving
>>> to
>>> a file and executing it is the only way that is cross-platform, I suppose.
>>
>> Doesn't Windows respond to her
2009/12/12 Shawn H Corey :
> Alan Haggai Alavi wrote:
>> Hi,
>>
>> Windows requires you to use double quotes in place of single quotes. Saving
>> to
>> a file and executing it is the only way that is cross-platform, I suppose.
>
> Doesn't Windows respond to here redirects?
>
> perl <> print "Hello
Alan Haggai Alavi wrote:
> Hi,
>
> Windows requires you to use double quotes in place of single quotes. Saving
> to
> a file and executing it is the only way that is cross-platform, I suppose.
Doesn't Windows respond to here redirects?
perl < print "Hello world\n";
> EOD
--
Just my 0.00
Hi,
Windows requires you to use double quotes in place of single quotes. Saving to
a file and executing it is the only way that is cross-platform, I suppose.
Regards,
Alan Haggai Alavi.
--
The difference makes the difference.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For addit
VOV...I was not knowing this...Thanks
There is so much still left to learn in Perl. :)
Cheers,
Parag
On Sat, Dec 12, 2009 at 3:20 AM, John W. Krahn wrote:
> Parag Kalra wrote:
>
>>
>> On Sat, Dec 12, 2009 at 1:55 AM, John W. Krahn wrote:
>>
>> Parag Kalra wrote:
>>>
>>> This works on L
Parag Kalra wrote:
On Sat, Dec 12, 2009 at 1:55 AM, John W. Krahn wrote:
Parag Kalra wrote:
This works on Linux -
perl -e 'foreach (Sugar,Sex,Simplicity,Sleep,Success,Smoking) { print "I
am only addicted to - 'Shekels' \n" if ($_ =~ /^s.*/i) }'
This works on Windoze -
perl -e "foreach (Su
2009/12/12 Parag Kalra :
> How is it going to new line without a new line character - '\n'. If I am not
> wrong - 'q/ /' signifies quoted context thus - a replacement for double
> quotes but still you should need a new line character to go to next line.
q// is single quotes, qq// is double quotes.
Thanks Philip for the wonderful explanation.
And thanks John, your code worked like a breeze both on Windoze & *Nix :)
And good thing is it provided the solution to insert a new-line character
which was not present in my Windoze code.
One question though in following code -
>>perl -le "/^s/i &&
> 2009/12/12 Parag Kalra :
>
>
> In the end though, I fail to see the utility of writing one-liners
> which execute on both linux and windows.
I may never have been on linux if that had been the case.
Back in Perl 4 days, I had W3.1, and read c.l.p.m. All the big guns
in those days had one lin
Parag Kalra wrote:
Hello All,
Hello,
This works on Linux -
perl -e 'foreach (Sugar,Sex,Simplicity,Sleep,Success,Smoking) { print "I am
only addicted to - 'Shekels' \n" if ($_ =~ /^s.*/i) }'
This works on Windoze -
perl -e "foreach (Sugar,Sex,Simplicity,Sleep,Success,Smoking) { print 'I am
on
2009/12/12 Parag Kalra :
> Hello All,
>
> This works on Linux -
> perl -e 'foreach (Sugar,Sex,Simplicity,Sleep,Success,Smoking) { print "I am
> only addicted to - 'Shekels' \n" if ($_ =~ /^s.*/i) }'
>
> This works on Windoze -
perl -e "foreach (Sugar,Sex,Simplicity,Sleep,Success,Smoking) { print
'
11 matches
Mail list logo