Could anyone tell me the difference between:
my ($errormsg) = $_[0];
and:
my ($errormsg) = shift;
Or is there no difference? ...but then: wich one is better, quicker?
And I would like to comments out the following lines. But can It be harmfull? Especially the first line.
# regular form data and need to remove any field with "---" as a value
# (as this denotes an empty SELECT field.)
if ($name ne "attach") {
$body =~ tr/ / /;
$body =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
# $body =~ s///g;
# $body =~ s/\n/
/g;
# $body =~ s/\r//g;
if ($body ne "---") {
exists $ATTACH{$name} ? ($ATTACH{$name} .= "~~$body") : ($ATTACH{$name} = $body);
}
my ($errormsg) = $_[0];
and:
my ($errormsg) = shift;
Or is there no difference? ...but then: wich one is better, quicker?
And I would like to comments out the following lines. But can It be harmfull? Especially the first line.
Code:
# If the form name is not attach, then we need to parse this like # regular form data and need to remove any field with "---" as a value
# (as this denotes an empty SELECT field.)
if ($name ne "attach") {
$body =~ tr/ / /;
$body =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
# $body =~ s///g;
# $body =~ s/\n/
/g;
# $body =~ s/\r//g;
if ($body ne "---") {
exists $ATTACH{$name} ? ($ATTACH{$name} .= "~~$body") : ($ATTACH{$name} = $body);
}