in reply to Re: Perl speciality
in thread Perl speciality

For example, in Perl to make a string you just declare it.
my $string = "This is my string";
Oh, yes, that's so different from C:
char *string = "This is my string";
Come on, if this is the best you can come up for something that's different between Perl and C, there would be no reason to bother with Perl.

Replies are listed 'Best First'.
Re^3: Perl speciality
by Jenda (Abbot) on Aug 14, 2009 at 13:10 UTC

    Yes, and then

    $string .= ". And now it's longer.";
    is just like ... erm ... how was that ... (I will not even try).

    Jenda
    Enoch was right!
    Enjoy the last years of Rome.

      Oh, I know, and I can give a gazillion more examples. *I* know the difference between Perl and C. I'm not claiming at all that Perl and C are similar. I'm just pointing out that the example given is a piss-poor example.
Re^3: Perl speciality
by Anonymous Monk on Aug 13, 2009 at 12:32 UTC
    Come on, if this is the best you can come up for something that's different between Perl and C, there would be no reason to bother with Perl.

    That is easy target for criticism. Please you provide a reason.

      One of my favorites is returning a list.
      my ($r,$g,$b) = getColor($widget);
      Easy! No messing around with a bunch of pointers.