Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Wouldn't that be =. ?

    $x .= $y # $x eq "$x$y"
    $x =. $y # $x eq "$y$x"

  • Source Filters? (Score:3, Insightful)

    by KM (4) on 2003.09.03 22:56 (#23826) Journal
    Filter done in 2 minutes.. may not always work :-)

    package Foo;

    use Filter::Util::Call;
    sub import {
      my ($type) = @_ ;
      my $ref = [] ;
      filter_add(bless $ref) ;
    }

    sub filter {
      my ($self) = @_ ;
      my $status = filter_read();

      if (/\s+=.\s+/) {
        s!^(\$[[:alnum:]_]+)\s+=.\s+(\$[[:alnum:]_]+)!$1 = $2 . $1!;
      }

      $status;
    }

    1;

    Script:

    use Foo;

    my $foo = " World";
    my $bar = "Hello";

    $foo =. $bar;
    print $foo . "\n";

    $zog =.1;
    print $zog;