in reply to sorting an array

Another way:
my @hold; for (@array) { if (my $status = /^\*{3}1\*{3}$/../^\*{3}end1\*{3}$/) { next if $status == 1 or $status =~ /E0/; push @hold, $_; } }
Update: Typo. Fixed. l=>1. Like I can read let alone tell the difference with that small of a font :-)

Replies are listed 'Best First'.
(Ovid) Re(2): sorting an array
by Ovid (Cardinal) on Aug 21, 2001 at 00:58 UTC

    Almost, but not quite :) Here's your output:

    $VAR1 = [ 'first', 'second', '***end1***', '***2***', 'third', 'fourth', '***end2***' ];
    </code>

    Cheers,
    Ovid

    Vote for paco!

    Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.