Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -wT
    use strict;
    open (FOO, '>/tmp/foobar') or die "Couldn't open /tmp/foo: $!\n";
    my $self = { 'fh' => \*FOO};
    print $self->{'fh'}  "This is a test\n";
    
  2. or download this
    String found where operator expected at ./foo.pl line 5, near "}  "Thi
    +s is a test\n""
        (Missing operator before   "This is a test\n"?)
    syntax error at ./foo.pl line 5, near "}  "This is a test\n""
    
  3. or download this
    my $fh = $self->{'fh'};
    print $fh "This is a test\n";
    
  4. or download this
    print scalar($self->{'fh'}) "This is a test\n";