Help for this page

Select Code to Download


  1. or download this
    use warnings;
    use strict;
    ...
    {
       print "Match $expr: '${$expr}' at position ($-[$expr],$+ [$expr])\n
    +";
    }
    
  2. or download this
    Can't use string ("1") as a SCALAR ref while "strict refs" in use at m
    +ytest.pl
        line 11 (#1)
    ...
    Uncaught exception from user code:
        Can't use string ("1") as a SCALAR ref while "strict refs" in use 
    +at mytest.pl line 11.
     at mytest.pl line 11.
    
  3. or download this
        $name = "foo";
        $$name = 1;    # Sets $foo
    ...
        &$name();    # Calls &foo() (as in Perl 4)
        $pack = "THAT";
        ${"${pack}::$name"} = 5;    # Sets $THAT::foo without eval
    
  4. or download this
        use strict 'refs';