yitzle wrote: > $strings = qw/Formatting_l_cs.cat Formatting_l_da.cat > Formatting_l_de.cat Formatting_l_zh-tw.cat/;
You are assigning a list to a scalar so that is equivalent to: $strings = 'Formatting_l_zh-tw.cat'; > my $partStrings = ( $strings =~ /_.*?\./ )[0]; # Minimun from _ to . The expression "$strings =~ /_.*?\./" returns true or false so $partStrings will either be assigned the value 1 or the value ''. > This code is untested. The RegEx should work but the rest... not sure. > It would work in a loop, though. > > Can someone explain why everyone's so into using qw/ / opposed to > quotes and commas? Less punctuation. John -- Perl isn't a toolbox, but a small machine shop where you can special-order certain sorts of tools at low cost and in short order. -- Larry Wall -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/