Old 20th August 2009, 11:27
itags.org itags.org is offline
Junior Member
Join Date: Aug 2009
Location: Huntsville
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to itags.org Send a message via Skype™ to itags.org
Default Perl formal arguments

This is stupid. I've got a module, and I'm calling its functions, passing values to it. I'm doing something like

my ($val1, $val2, $val3, $val4 ) = (1, 2, 3, 4);
$obj->func( $val1, $val2, $val3, $val4 );

However, sometimes it decides to throw some random reference in there.... so my ..._ will look like

(Module=HASH(0x848f3), 1, 2, 3, 4)

Why is it just randomly throwing in a reference to a hash in there? It wouldn't be so horrible if it would throw it at the front every time, but when I call the subs from other subs inside the same module, that extra junk doesn't get passed.
I am Good at Dotnet,Database,Microsoft Technology,Java,Mail,
I'm Microsoft, I'm Sun, I'm Apple, I'm Google...
Reply With Quote
Sponsored Links
Old 3rd September 2009, 13:15
parkerlindsey parkerlindsey is offline
Junior Member
Join Date: Sep 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts


When you pass several arrays to a subroutine, Perl creates one list in @_. There is no possibility to determine which elements are from which array. If you need these informations, you can pass references to the arrays. They can then be dereferened by @_.That probably doesn't help but I can't help more unless I see some more code.
Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Runaway Perl aws910 Server Operation 2 19th November 2007 18:24
Perl error message namit Programming/Scripts 12 11th October 2007 14:40
Can't do it. Mono-Project BullyWug Installation/Configuration 6 15th April 2007 12:27
Perl and cgi script installation linuxuser1 General 30 27th April 2006 00:09
Perl non-printable chars and unwanted formatting spinoza Programming/Scripts 4 1st April 2006 21:30

All times are GMT +2. The time now is 07:58.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.