This was my first guess, but I'm sure there are better
ways:
my @ary = qw(exon1
exon5
exon12
exon30
exon2);
@ary = sort by_exon_num @ary;
print join("\n", @ary), "\n";
sub by_exon_num {
$a =~ /(\d+)/;
my $a_dig = $1;
$
> ok, seriously, we'll also assume no two entries have
> the same number, and if
> they did you'd want to delete repeats. This makes
> things a lot easier.
>
> #! perl
>
> open FILE, 'file.txt';
> @list = ; # get list into array or by some
> other means
> # keep the line brea
nly output to STDOUT, otherwise the
redirection won't occur.
Any output from script.pl on will be displayed in the user's
browser.
Regards,
David Iberri
on 11/29/2001 5:21 PM, John Murray at [EMAIL PROTECTED] wrote:
> If I send a form to a script that the sends back some html, t
Hi folks,
Can anyone point me to some docs relevant to multiple inheritance?
I have two base classes A and B, then a derived class C that inherits from A
and B. Pretty standard, I think:
package A;
sub new {
my $pkg = shift;
return bless { _key1 => 'val1', _key2 => 'val2' }, $pkg;
}
packa
Randal L. Schwartz wrote:
>>>>>> "David" == David Iberri <[EMAIL PROTECTED]> writes:
>
> David> Can anyone point me to some docs relevant to multiple inheritance?
>
> David> I have two base classes A and B, then a derived class C that
>
Said allan:
>> Keary Suska wrote:
>>
>> IMHO, symbolic refs are syntactic sugar that make code difficult to read,
>> follow, and debug. I recommend using hashes or objects instead. They are
>> easier to read, follow, and debug, and are more extensible.
Not to mention that those extra sigils give
$presVocab{$a} cmp $presVocab{$b}
} keys %presVocab;
foreach my $key(@keys_sorted_by_value) {
print "$key => $presVocab{$key}\n";
}
Cheers,
David Iberri
--- allan <[EMAIL PROTECTED]> wrote:
> hi
>
> is it possible to sort by the values in a hash if
> those values m
Hi Eelco,
This solution requires the File::Tail module available from CPAN
(File::Tail, in turn, requires Time::HiRes):
use File::Tail;
# File to read from
my $text_file = '/www/logs/error_log';
# Number of lines to read from end of file
my $num_lines = 25;
# Create a new File::Tail object sta
Hi Eelco,
If you're data file isn't excessively large, you might use the following
example. Otherwise, you should probably stuff you data file into a database
,such as CSV or mysql, and use the DBI (available at www.cpan.org) for
processing.
The following code reads in each line of $data_file, re