Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: De-Reference an array

by bv (Friar)
on Oct 09, 2009 at 14:27 UTC ( [id://800288]=note: print w/replies, xml ) Need Help??


in reply to De-Reference an array

I'm not sure you really want to do what you think you are doing. Your code would be much cleaner, faster, and do what you mean if you kept it all in one script and used subs, like so:

use strict; use warnings; my @array1 = ( 1 .. 3 ); my @array2 = ( 4 .. 6 ); print2arrs( \@array1, \@array2 ); sub print2arrs { my ( $ref1, $ref2 ) = @_; print @$ref1; print @$ref2; }

And if you really do need to keep them in separate files, check out require or do to avoid using the system command and firing off an entirely new perl interpreter

print pack("A25",pack("V*",map{1919242272+$_}(34481450,-49737472,6228,0,-285028276,6979,-1380265972)))

Replies are listed 'Best First'.
Re^2: De-Reference an array
by Ankit.11nov (Acolyte) on Oct 12, 2009 at 06:28 UTC
    Hi Steve, Thanks for the piece of code.

    What I am working upon: 1) Parsing ~100 of XML files 2) The information which is extracted is kept in an different arrays 3) Info available in the arrays is entered into an excel sheet.

    Thats what I was exploring with this small piece of code.

Log In?
Username:
Password:

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

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

    No recent polls found