Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: LaTeX Abbreviations for Linguists

by jwkrahn (Monsignor)
on Jul 06, 2009 at 20:13 UTC ( #777660=note: print w/ replies, xml ) Need Help??


in reply to LaTeX Abbreviations for Linguists

if ( $abbr =~ m/[A-Z]{2,}/ ) { my @inlist; push(@inlist, $abbr); foreach (@inlist) { if ( $_ =~ /\./ ) { my @dumm = split(/\./, $_); $inlist[0] =~ s/\.//g; foreach (@dumm) { push(@inlist, $_); }; }; };

From perlsyn:

If any part of LIST is an array, foreach will get very confused if you add or remove elements within the loop body, for example with splice. So don't do that.
You are pushing items onto @inlist at the same time that you at iterating over @inlist.   You shouldn't do that!


Comment on Re: LaTeX Abbreviations for Linguists
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://777660]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (11)
As of 2015-01-30 21:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My top resolution in 2015 is:

















    Results (254 votes), past polls