Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Tie::File with absolute path of the file

by haukex (Archbishop)
on Dec 05, 2017 at 06:13 UTC ( #1204924=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    open my $ifh, '<', $filename or die "$filename: $!";
    chomp( my @array = <$ifh> );
    ...
    open my $ofh, '>', $filename or die "$filename: $!";
    print $ofh $_,"\n" for @array;
    close $ofh;
    
  2. or download this
    use File::Replace;
     
    ...
        print {$repl->out_fh} $line, "\n";
    }
    $repl->finish;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2022-08-17 05:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?