[Israel.pm] Perl Advocacy
Gabor Szabo
gabor at pti.co.il
Mon Dec 27 08:10:44 PST 2004
On Mon, 27 Dec 2004, Offer Kaye wrote:
>> Worse than that there is no trim that would remove spaces from the
>> beginning and the end of a string.
>
> I didn't understand this, Gabor. Please explain.
>
>
I wrote this for educational reasons.
Thanks Dov for your solution.
another str_replace [1]
sub str_replace {
my ($str, %map) = @_;
$str =~ s/(.)/ defined $map{$1} ? $map{$1} : $1 /eg;
return $str;
}
Every language has to decide what size are the building blocks it is
using and what is the level of abstraction. I think there is no right
or wrong way. They fit to a different audience and different purposes.
A a native Parrot programmer would say: Perl is just bloated.
BTW Is there a module Functions::PHP that exports those 3000 functions
PHP has ? If no such module, what about writing one ?
Gabor
[1] I fear the golfers now
More information about the Perl
mailing list