The information given to you on this is sufficient to explain that the
repetition operator (x) takes a string on the left and a number on the
right (specifically a positive integer). As you can tell, perl does not
make you say that a $foo is an integer or $foo is a string, but rather just
allows y
Hello Singh,
Chomp the $string and test again.
Really sorry I cannot bottom post with BBerry phone.
Regards
On 12/29/12, Om Prakash Singh wrote:
> Hi All,
>
> I am new to perl and while going through the chapters of Learning perl,
> i just came through one excessive, while i was able to complete
Hi Shlomi,
On Saturday 29 December 2012 10:23 PM, Shlomi Fish wrote:
Hi Omps,
On Sat, 29 Dec 2012 22:12:14 +0530
Om Prakash Singh wrote:
Hi All,
I am new to perl and while going through the chapters of Learning perl,
i just came through one excessive, while i was able to complete it, i
just
Hi Om Orakash,
but, when i use
> $result = $number x $string;
> I don't get any output at all, just wondering why this happens, any help
> would be highly appreciable.
>
Binary "x" is the repetition operator. To get more please see this link
http://perldoc.perl.org/perlop.html#Multiplicative-Ope
Hi Omps,
On Sat, 29 Dec 2012 22:12:14 +0530
Om Prakash Singh wrote:
> Hi All,
>
> I am new to perl and while going through the chapters of Learning perl,
> i just came through one excessive, while i was able to complete it, i
> just came across something that didn't work and i couldn't find a
That's because in this case the 'x' is acting as an operator which takes in
a string on the left side, a number on the right side, and returns the
string replicated as many times as the number.
When you flip them, it tries to treat the string as a number, which is a
problem. So it returns undef or
Hi All,
I am new to perl and while going through the chapters of Learning perl,
i just came through one excessive, while i was able to complete it, i
just came across something that didn't work and i couldn't find any
explanation for it. Would be great if i get some help in understanding
this