Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^4: selecting columns from a tab-separated-values file

by mildside (Friar)
on Jan 24, 2013 at 22:59 UTC ( [id://1015243]=note: print w/replies, xml ) Need Help??


in reply to Re^3: selecting columns from a tab-separated-values file
in thread selecting columns from a tab-separated-values file

Great job there Lotus1.

I'm curious about the use of splice to clear the array in your code, as below:

    splice( @$aref );

I would probably have used the below:

    @$aref = ();

Is splice faster or better in some other way?

Replies are listed 'Best First'.
Re^5: selecting columns from a tab-separated-values file
by Lotus1 (Vicar) on Jan 25, 2013 at 02:23 UTC

    Thanks. I started with assigning the empty array but I had a bug somewhere so I stuck the splice in and got it working. I think I forgot the '@' in the first try but put it in with splice. I don't know which is faster but it is only called a handful of times in this approach anyway.

Log In?
Username:
Password:

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

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

    No recent polls found