Hi all,

I am reading through a collegue's perl script. In it he has the following lines:


sub SomeSubName
{
my ($vara, $varb, $varc, @items) = @_;
my ($itemtype, %symbol);
...
}

The first line I understand; here you are getting the parameters to the subroutine (which are stored in @_), and putting them into particular variable names - $vara, $varb, and so on.

The second line however, I am not clear what it is doing.

It seems to be creating an in-line list, but firstly, that list is not assigned to anything, and secondly he is storing a hash into the list (presumably it must be a reference to a hash, since you cannot actually store a hash into a data structure such as a list or an array without using refernces...

Could anyone see what possible value could be had in creating the list:

my ($itemtype, %symbol);

Is this assigned to some default name?

thanks heaps

David Buddrige.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to