Below is a piece of perl code I need help to understand:
The output from 'warn' is:
What I don't understand:
1) What is this: $command =~ /(.*)/;
2) The difference between $command and $1?
Thank you for your help!
Code:
my $command = "process$fieldType($locked,$req,$colID,$colspan,$rowspan,$maxWidth,$maxHeight,'$fieldName','$sectable','$nameField','$idField',$caseAware,'$linkTable',$activeCase,$ai,$large,\\\@jsver,\\\$jsSetupCode)";
$command =~ /(.*)/;
my $tempthingy = eval($1);
warn "\$1 = $1\n\$command = $command\n\n";
The output from 'warn' is:
Code:
[Tue May 15 16:41:27 2007] null: $1 = processMultipleDropdown(0,1,99591,1,1,25,8,'c99591','Discovery.2509SECt1440c99591', 'valueField','id',0,'Discovery.2509LINKt1440c99591',2509,0,0,\@jsver,\$jsSetupCode)
[Tue May 15 16:41:27 2007] null: $command = processMultipleDropdown(0,1,99591,1,1,25,8,'c99591','Discovery.2509SECt1440c99591','valueField','id',0,'Discovery.2509LINKt1440c99591',2509,0,0,\@jsver,\$jsSetupCode)
What I don't understand:
1) What is this: $command =~ /(.*)/;
2) The difference between $command and $1?
Thank you for your help!