Re: Need explanation of expression

2013-11-18 Thread Angela Barone
> Specifically, http://perldoc.perl.org/perlop.html#Conditional-Operator > > '?:' is otherwise known as the 'ternary conditional operator' -- if > you don't know that bit of esoterica, finding the right documentation > is a lot harder. 8^) Thank you, everyone! It's a lot clearer to me n

Re: Need explanation of expression

2013-11-18 Thread Shawn H Corey
On Mon, 18 Nov 2013 12:14:05 -0800 Angela Barone wrote: > Could someone explain the format of the following line and how to > read it? > > $name = $fieldname =~ /\[(.*?)\]/ ? $main::global->{'form'}->{$1} : > $out; It means: if( $fieldname =~ /\[(.*?)\]/ ){ $name = $main::global->{'form

Re: Need explanation of expression

2013-11-18 Thread John SJ Anderson
On Mon, Nov 18, 2013 at 12:34 PM, John W. Krahn wrote: >> Also, is there something in the perl man pages about it? > > > Yes. You probably want perlop? Specifically, http://perldoc.perl.org/perlop.html#Conditional-Operator '?:' is otherwise known as the 'ternary conditional operator' -

Re: Need explanation of expression

2013-11-18 Thread John W. Krahn
Angela Barone wrote: Hello, Hello, Could someone explain the format of the following line and how to read it? $name = $fieldname =~ /\[(.*?)\]/ ? $main::global->{'form'}->{$1} : $out; Do the contents of $fieldname match the pattern /\[(.*?)\]/? If they do then assign $main::g