Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

typeglobs and filehandles

by zzspectrez (Hermit)
on Dec 20, 2000 at 22:45 UTC ( [id://47629]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub foo {
         my $self = shift;
    ...
         open FH, $filename or die "Can not open file: $!\n";
         $self->{'fh'} = \*FH;
    }
    
  2. or download this
    package FOO;
    use diagnostics;
    ...
    while ($data = $foo->read_line) {
        $foo->write_line($data);    
    }
    
  3. or download this
    KEY: out_fh     VAL: GLOB(0x1a75098)
    KEY: inp_fh     VAL: GLOB(0x1a75038)
    KEY: input      VAL: inp.dat
    KEY: blahh      VAL: blah
    KEY: output     VAL: out.dat
    
  4. or download this
    KEY: out_fh     VAL: *FOO::FH
    KEY: inp_fh     VAL: *FOO::FH
    
  5. or download this
    sub _open_write {
        my    $self = shift;
    ...
        open $fh, ">$self->{'output'}" or die "Couldn't open file: $!\n";
        return $fh;
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (7)
As of 2024-04-23 17:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found