On Sat, Jan 15, 2011 at 03:20, Dr.Ruud wrote:
> On 2011-01-15 08:52, Emeka wrote:
>
>> rmicro@RMICRO-PC C:\Program Files\xampp
>> # perl -le '$str = "the cat sat on the mat";print substr( $str, 4, -4 )'
>> Can't find string terminator "'" anywhere before EOF at -e line 1.
>
> On Windows it should
On 2011-01-15 08:52, Emeka wrote:
rmicro@RMICRO-PC C:\Program Files\xampp
# perl -le '$str = "the cat sat on the mat";print substr( $str, 4, -4 )'
Can't find string terminator "'" anywhere before EOF at -e line 1.
On Windows it should probably look like:
# perl -wle "$s=q{abc def ghi jkl};pr
*If I were beginning with Perl, I certainly would not practise in the
console but get an editor, such as SciTE*
Yes, I am.
On Sat, Jan 15, 2011 at 3:04 PM, John Delacour wrote:
> On 15 January 2011 07:52, Emeka wrote:
>
> > # perl -le '$str = "the cat sat on the mat";print substr( $str, 4, -4
On 15 January 2011 07:52, Emeka wrote:
> # perl -le '$str = "the cat sat on the mat";print substr( $str, 4, -4 )'
> Can't find string terminator "'" anywhere before EOF at -e line 1.
>
> rmicro@RMICRO-PC C:\Program Files\xampp
> #
>
> It failed to work for me. Why?
Because you can't use single
Setting environment for using XAMPP for Windows.
rmicro@RMICRO-PC C:\Program Files\xampp
# perl -le '$str = "the cat sat on the mat";print substr( $str, 4, -4 )'
Can't find string terminator "'" anywhere before EOF at -e line 1.
rmicro@RMICRO-PC C:\Program Files\xampp
#
It failed to work for me
On 11-01-12 11:27 PM, Sunita Rani Pradhan wrote:
I have a string as; $str = "the cat sat on the mat" .
How the following command works substr($str , 4, -4) on the string ?
What should be the output?
TITS (Try It To See)
perl -le '$str = "the cat sat on the mat";print substr(
On Jan 12, 8:27 pm, sunita.prad...@altair.com ("Sunita Rani Pradhan")
wrote:
> Hi All
>
> I have a string as; $str = "the cat sat on the mat" .
>
> How the following command works substr($str , 4, -4) on the string ?
> What should be the output?
>
See: perldoc -f substr
Check the do
the output will be
cat sat on the
all the characters in the string $str except four characters from the left
and right will be displayed...
Regards
Ashwin Thayyullathil Surendran
On Thu, Jan 13, 2011 at 9:57 AM, Sunita Rani Pradhan <
sunita.prad...@altair.com> wrote:
> Hi All
>
>
>
>
Hi All
I have a string as; $str = "the cat sat on the mat" .
How the following command works substr($str , 4, -4) on the string ?
What should be the output?
Thanks
Sunita