Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Syntax error when trying to use a hash value as a file stream specifier

by fireblood (Scribe)
on Sep 02, 2022 at 19:06 UTC ( [id://11146640]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    print STDERR "This is line 1.\n";
    
    ...
    print $which_stream "This is line 3.\n";
    
    #print $hash{key} "This is line 4.\n";
    
  2. or download this
    This is line 1.
    This is line 2.
    The value of the hash variable is STDOUT.
    This is line 3.
    
  3. or download this
    String found where operator expected at test.pl line 12, near "} "This
    + is line 4.\n""
            (Missing operator before  "This is line 4.\n"?)
    syntax error at test.pl line 12, near "} "This is line 4.\n""
    Execution of test.pl aborted due to compilation errors.
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11146640]
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-25 12:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found