Re: assign default value to variables I assign from split

[email protected] ("Dr.Ruud")
Newsgroups perl.beginners
Organization Chaos rules.
Message-ID <[email protected]>
"Jenda Krynicky" schreef:
> Dr.Ruud:
>> Richard Lee:

>>> [$file1,$file2,$file3,$file4,$file5,$file6,$file10,$file25]
>>> I didn't want to put them in array
>>> since I need to use individual named variable later
>>
>> And why is that?
>
> Maybe because in the real code they are not $file1, $file2,...
> but rather $username, $password, $last_login, $created,
> $permissions, ...

Then you create named constants for that, with enumeration if you like;
or use a hash.


> And assigning the default is the last thing that's done to all of
> them.

There would be no problem to do that.

But better stop guessing and let Richard answer.

-- 
Affijn, Ruud

"Gewoon is een tijger."
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.