I am working with a Perl script's pm file and I have attempted to turn to Google for my answers. However, I am trying to understand the function of the two vertical pipes that precede the equal sign when assigning some variables either a numeric value:
$C ¦¦ = 1;
or string value:
$C ¦¦ = 'string';
I have worked with Perl but not recently, and need to brush up on these things.
Google does not return anything useful when the search contains ¦¦ = characters, and I do not know what words to enter that describe these.
I have looked at some CGI tutorials but no mention in what I have read about the pipes.
Could someone please provide an explanation or a link?
Thanks in advance.
Larry
[perldoc.perl.org...]
used with the assignment operator '=' it has the same meaning as:
$C = $C ¦¦ 1;
which is the same as:
$C = defined($C)? $C : 1;
which is the same as:
if (defined($C)) {
$C = $C;
}
else {
$C = 1;
}
this page lists all the perl operators and has some explanations of them:
[perldoc.perl.org...]
if you are going to working with perl again you will want to bookmark the site:
[perldoc.perl.org...]