2?Perl language tips are met today.
1.?a code snippet is as follows:
?
$code[$idx] =~ /^\s*(.+?)\s*$/;
$code[$idx] = $1;
Seem it's to extract the content without leading and tailing white space. But the (.+?) is still not understood.
2. a code snippet is as follows:
my $currentframe;
$currentframe = {
?_pc_ => 0,
?_func_ => 'main'
?};
what's the type of $currentframe? handle to a hashtable??
Answer: $currentframe is a reference to?an anonymous?hash. Usage: $$currentframe{_pc_} or $currentframe->{_pc_}