Your code doesn't compile. You've left out braces here and there. In the
future, please use WORKING code unless such code is not possible to
create.
On Jun 10, [EMAIL PROTECTED] said:
>$ff="hello fred 12";
>@gg=split(//, $ff);$gglen=@gg;
>$hh=substr($ff, ($gglen-1), 1);$fin="n";$val=1;
First,
Steven Massey wrote at Mon, 10 Jun 2002 08:45:57 +0200:
> Hi All
> The code I have written below works, and yes I could leave it at that..
Oh, I think you shouldn't.
Your code isn't very readable and thats in fact at least important as speed.
What does $ff stands for, $gg.
Well $gglen is the si
>
>
> You are assuming that your string if it ends with a number will only be 4 digits
>wide.
> if $str is assigned "hello fred 12345" it will print nothing.
>
$str should actually be $ff, sorry
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
> Hi All
> The code I have written below works, and yes I could leave it at that.. but
> I want if possible to write efficient
> code as this seems to be what PERL is all about. So any thoughts anyone ??
>
> =
> this cod
Hi All
The code I have written below works, and yes I could leave it at that.. but
I want if possible to write efficient
code as this seems to be what PERL is all about. So any thoughts anyone ??
=
this code takes a variable containin words and