Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: desire to pass file handles by value

by pg (Canon)
on Nov 07, 2003 at 03:12 UTC ( #305224=note: print w/replies, xml ) Need Help??


in reply to desire to pass file handles by value

Besides what Roger said, if this is all what you want to do, you can:

use Data::Dumper; use strict; use warnings; my @lines = <DATA>; my $count = {}; map {chomp;$count->{$_} ++} @lines; print Dumper($count); __DATA__ a a a c d e

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (11)
As of 2019-06-18 12:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Is there a future for codeless software?



    Results (81 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!