> >> I want to write to a file all of the array(@data), except the first > >> field???? > > > >@data[1..-1] > > > >means the array @data from element 1 to the last element. > > Sadly, Perl does not support that syntax. Ranges must be > low..high. @foo[1..-1] doesn't work.
Jonathan throttles the camel violently, screaming: "Do What I Mean (DWIM)" and then carefully restores order to the universe (and apologies to the camel). It looked promising, but Perl doesn't make a special case of ranges in array slices, as Japhy points out. It isn't the first time I've tried that construction though. The problem is Perl is just too consistant in some places, although in others you've got to watch out for special magic. Jonathan Paton ===== $_=q|.,&@$$. ,.@$&@$. .&$$@. ,,$ ....!$_=$p.'&$@.',y'&$@' .,';for(/\S+/g){ !|.q| .$ .,@, ,$, .,.. @, ,$ ,,@ .,,.!++$.<22?${'y'.$_}=chr$.+64:[$$=${'y' !|.q| ,@$@&.,. $$$&, ..@&&$,,, $., ..!.$_},$y.=($.=~/22\|26\|3(3\|7)/x?' ' !|.q|. @ ., ,.&,,, , .$..&. .,$ .,,!.$$:"\l$$")]};$y=~/ (.*)/;warn"$1\n" !|.q|. $ .,. .,$$&&$...&., @.,.&@$@ .|,map{-$|--?$r:$p.=$_}split'!';eval$r __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]