Help for this page

Select Code to Download


  1. or download this
       @$arrayref;
    
  2. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    my $arrayref;
    @$arrayref;    # line 5
    print "ok";
    
  3. or download this
    Useless use of a variable in void context at test.pl line 5.
    Can't use an undefined value as an ARRAY reference at test.pl line 5.
    
  4. or download this
    if ($arrayref) { ... }
    
  5. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    for (@$arrayref) {
        print "ok\n";
    }
    
  6. or download this
    Can't use string ("1") as an ARRAY ref while "strict refs" in use at t
    +est.pl line 5.