Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^8: Data manipulation on a file

by CountZero (Bishop)
on Oct 02, 2015 at 21:41 UTC ( [id://1143687]=note: print w/replies, xml ) Need Help??


in reply to Re^7: Data manipulation on a file
in thread Data manipulation on a file

No, you run it on the array. The argument to uniq is an array or list, not a string.

In your script it will be $outputstring .= "$filer:" . (join ' :', uniq sort @{$filer_hash{$filer}}) . ','; (untested)

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics

Log In?
Username:
Password:

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

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

    No recent polls found