Hi Wiggins Am Montag, 7. März 2005 17.19 schrieb Wiggins d'Anconia: > John Doe wrote: > > Hi Hendrik > > [snip] > > >>Well, in writing this, I solved half of my problem, but one still > >>remains: how can I remove a line? I tried with delete, as you see > >>below, but (of course) this does not work, as $lijn is no array element. > > > > I think you also can't do it with an array (delete does not _remove_ an > > array element) > > Err! More recent Perl's C<delete> can remove an element of an array. > Whether this works with Tie::File I did not confirm, but it *should*. > > perldoc -f delete
ok, read it, thanks. "Note that deleting array elements in the middle of an array will not shift the index of the ones after them down--use splice() for that. See "exists"." that was what I meant (and obviously did not say clear). bash-2.05b$ perl -v This is perl, v5.8.5 built for i686-linux bash-2.05b$ perl my @a=(qw/1 2 3 4 5/); delete $a[2]; print join ', ', @a, "\n"; rint "size of array: ", scalar @a, "\n"; # this prints: 1, 2, , 4, 5 size of array: 5 Then I read the CHANGES of the most recent version 5.8.6-RC1 on search.cpan.org/dist/perl/, but I could only find there: [ 23158] [perl #30733] memory leak in array delete av_delete() wasn't mortalizing the returned value [ 23271] only mortalize deleted array elements for AvREAL (update to change #23158 What did I miss? What do you mean by "a more recent perl?" BTW: In the case you read some of my posts: What do you, as a routined helper here, honestly think: Should I stop answering questions? I don't want to mainly confuse the people, and I'm not here for public relation, since my name is not john doe and I don't work for tele2.ch. greetings joe -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>