Re: [OT] Unicode vs URI escaping

2002-11-19 Thread Vladi Belperchinov-Shabanski
öèòèðàì Ian Phillipps [EMAIL PROTECTED]: On Tue, 19 Nov 2002 at 11:30:17 +0200, Vladi Belperchinov-Shabanski wrote: hi! I hope I understand the problem correctly, i.e. `how to escape'? In this case I always prefer: our %ESCMAP = (); for ( 0 .. 255 ) { $ESCMAP{ chr( $_

limit the list

2002-11-19 Thread Selector, Lev Y
Folks, Simple question: Is there a more elegant way to express this: an array of names is converted into a comma-separated list. if the list gets to long - limit it and add , etc. at the end. $str = join ', ', @names; if (length($str)90) { ($str = substr($str,0,90)) =~

Re: limit the list

2002-11-19 Thread A. Pagaltzis
* Selector, Lev Y [EMAIL PROTECTED] [2002-11-20 00:55]: an array of names is converted into a comma-separated list. if the list gets to long - limit it and add , etc. at the end. $str = join ', ', @names; if (length($str)90) { ($str = substr($str,0,90)) =~ s/,[^,]*$/, etc./;

Re: limit the list

2002-11-19 Thread Michael G Schwern
On Tue, Nov 19, 2002 at 06:50:36PM -0500, Selector, Lev Y wrote: Is there a more elegant way to express this: an array of names is converted into a comma-separated list. if the list gets to long - limit it and add , etc. at the end. $str = join ', ', @names; if

RE: limit the list

2002-11-19 Thread Alistair . McGlinchy
-Original Message- John W. Krahn [mailto:[EMAIL PROTECTED]] On Tuesday 19 November 2002 15:50, Selector, Lev Y wrote: Simple question: Is there a more elegant way to express this: an array of names is converted into a comma-separated list. if the list gets to long - limit

RE: limit the list

2002-11-19 Thread Steven Lembark
IMHO both of these are very rude to $str by making it receive data it never wanted. This is then followed by an half hearted apology (oh sorry my $str = join ',', grep { defined } @namz[0..89]; $str .= ', etc...' if @namz 90; -- Steven Lembark 2930 W. Palmer

Re: limit the list

2002-11-19 Thread A. Pagaltzis
* A. Pagaltzis [EMAIL PROTECTED] [2002-11-20 02:00]: my ($i, $total); ($total += $_) 90 or last, $i++ for map length, @names; $str = join ',', @names[0 .. $i]; $str .= ', etc' if $i $#names; Sorry, that would of course be ($total += length) = 90 or last, $i++ for @names; The map was left

Re: limit the list

2002-11-19 Thread A. Pagaltzis
Ok, another attempt, this time with brain engaged and coffee consumed. $str = join ', ', @names; if (length($str)90) { ($str = substr($str,0,90)) =~ s/,[^,]*$/, etc./; } my ($i, $total); ($total += length) 90 ? $i++ : last for @ARGV; $str = join ', ', @ARGV[0 .. $i]; $str .= ', etc' if