Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: desire to pass file handles by value

by pg (Canon)
on Nov 07, 2003 at 03:12 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://305224]
help
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found