in reply to over loading

Suppose these two scenarios:

Replies are listed 'Best First'.
Re^2: over loading
by GrandFather (Saint) on Aug 20, 2009 at 21:41 UTC

    Except that $string++ not only doesn't generate errors or warnings, but is in fact a highly useful DWIMism of Perl:

    use warnings; use strict; my $letter = 'a'; print $letter++ for 1 .. 26; print "\n"; my $serial = 'S001'; printf "%s, ", $serial++ for 1 .. 10;

    Prints:

    abcdefghijklmnopqrstuvwxyz S001, S002, S003, S004, S005, S006, S007, S008, S009, S010,

    True laziness is hard work