Help for this page

Select Code to Download


  1. or download this
    ====usual variable substitution idiom for comparison====
    my $lamb = 'wolf';
    my $text = 'Mary had a little $lamb.';
    $text =~ s/(\$\w+) /$1/eeg;
    print $text;
    
  2. or download this
    my $lamb;
    my $mary="Little Rabbit Foo Foo ";
    ...
    my $text = '$mary had a little $lamb->{data}[0].';
    $text =~ s/(\$[\w\-\>\{\}\[\]]+)[ \.]/$1/eeg;
    print $text;