otype access to a specific
website where I know the data that I am looking for and extract it with
a simple script.
I do appreciate the feedback that ultimately - as part of my journey
with web client programming - I need to learn how to use HTML parsers.
Best regards, Edward
On 3/05/2013 9:
I print $data, I can see the individual lines of the HTML data but
I'm not clear on the "pattern" that I should use in split or if there is
a better way to do this.
I understand that there are packages to parse HTML code but this is also
a learning exercise for me.
Thanks in adv
Hi Raf,
Yours is the first email that I have received on this topic. Not sure
why I missed the other.
I tried a forced installation but this didn't work. See below.
Thanks and best regards, Edward
On 26/03/2013 9:14 AM, rjc wrote:
On Thu, Mar 14, 2013 at 10:57:15PM GMT, Edward and
with the paths in @INC (see below) but why
should a standard install process fail?
LWP was the first CPAN package that I tried to install and I didn't have
any problems with this. Any help
columns (begin + end)
which I need to find the time difference between them
--
Edward
Institute For Infocomm Research - Disclaimer -This
email is confidential and may be privileged. If you are not the intended
recipient, please delete it and notify us immediately. Please do
ame=>'action', -value => 'Run MySCRIPT'),
print endform;
Can anybody suggest how can it be done with CGI.pm?
The complete code can be found here: http://dpaste.com/9026/plain/
--
Regards,
Edward WIJAYA
Institute For Infocomm Research - Disclaimer ---
without "use lib").
But not in through Apache.
--
Edward WIJAYA
SINGAPORE
--
> mailto: [EMAIL PROTECTED]
> http://home.arcor.de/jeffpang/
Institute For Infocomm Research - Disclaimer -
This email is confidential and may be privileged. If you are not t
nv" direction in the httpd.conf.
How do you do that?
I can't see any directive related to that. Please advice.
--
Edward WIJAYA
SINGAPORE
2007/4/9, Wijaya Edward <[EMAIL PROTECTED]>:
>
>
> Dear experts,
>
> I have the following simple Perl script (called "
Dear experts,
I have the following simple Perl script (called "hellom.cgi"):
__BEGIN__
#!/usr/bin/perl
use CGI qw/:standard :html3/;
use CGI::Carp qw( fatalsToBrowser );
$CGI::POST_MAX=1024 * 100; # max 100K posts1
#--
# BEGIN {
# if ( $EN
$arg2, $filename );
### Do anything else the main thread needs to do here, *before* calling join.
### The joins will block until their threads complete.
### The values returned by the functions are returned when you join the thread.
my @array = $thrArray->join;
print "@array\n";
__EN
It depends what do you mean by maximum.
Assume you have numerical value as hash values.
You can do:
use List::Util qw(max)
my %hash = { foo => 3, bar=>2, qux=> 1};
my $max_val = max values %hash;
Hope that helps.
--
Regards,
Edward WIJAYA
Fro
;G' => [ 0, 0, '0.5', '0.5', 0, '0.5' ]
};
Instead of the correct:
$VAR1 = {
'A' => [ '0', '1', '0', '0', '0', '0' ],
'T' => [ '0', '0', '0',
; => ['0.25','0','0.25']
}
In this link you can find my incredibly naive and inefficient code.
Can any body suggest a better and faster solution than this:
http://www.rafb.net/paste/results/c6T7B629.html
Thanks and Regards,
Edward WIJAYA
SINGAPORE
-
asier.
Regards,
Edward WIJAYA
SINGAPORE
Institute For Infocomm Research - Disclaimer -
This email is confidential and may be privileged. If you are not the intended
recipient, please delete it and notify us immediately. Please do not copy or
use it for any purpos
Hi
Look for a CPAN module called Date::Calc.
There you can find a method called Week_of_Year.
Hope that's what you want.
Regards,
--
Edward WIJAYA
SINGAPORE
From: Practical Perl [mailto:[EMAIL PROTECTED]
Sent: Fri 9/1/2006 3:34 PM
To: beginners
rsion when running as root, and is the
directory subtree it is under readable by your user?
Salam,
Edward WIJAYA
From: Toddy Prawiraharjo [mailto:[EMAIL PROTECTED]
Sent: Tue 8/22/2006 9:48 AM
To: Perl Beginners
Subject: Problem with library paths
Hello al
gt; $ perl -e '$str = "0a0a0a0a0a"; $str2 =join(":",$str=~ /(..)/g);
> print "$str2\n";'
>
> prints:
>
> 0a:0a:0a:0a:0a
I think this is even better, since this doesn't restrict you
to have even number of characters
$ perl -e '$
0a0a0a"; $str2 =join(":",$str=~ /(..)/g); print
"$str2\n";'
prints:
0a:0a:0a:0a:0a
Regards,
Edward WIJAYA
SINGAPORE
Institute For Infocomm Research - Disclaimer -
This email is confidential and may be privileged. If you are not the intended
(["foo woo","[EMAIL PROTECTED]"],
["bar woz","[EMAIL PROTECTED]"],
["foo qux", "[EMAIL PROTECTED]"],);
foreach my $disp_name ( sort {$a->[0] <=> $b->[0]} @AoA ) {
# do whatever
27;) # of file field
I've tried with:
uploadInfo($file)->{'Content-Length'};
But it doesn't print anything.
Regards,
Edward
Institute For Infocomm Research - Disclaimer -
This email is confidential and may be privileged. If you are not the int
ample,
my $filehandle = do_sth_to_convert($string);
Such that I can straight away do things like:
while (<$file_handle>) {
print;
}
[download]
Regards,
Edward WIJAYA
SINGAPORE
Institute For Infocomm Research - Disclaimer -
This email is confidential and may be
;[EMAIL PROTECTED]',
'-type',
'sugar',
'-unit',
'10'
];
TOTAL: 1000 - [EMAIL PROTECTED]
__END OUTPUT__
Hope to hear from you again.
--
Regards,
Edward WIJAYA
Institute For Infocomm Resea
ript can be found here:
http://rafb.net/paste/results/8oFtJS58.html
I tried not to trouble you again after this.
But your expert advice is highly valued
Regards,
Edward WIJAYA
SINGAPORE
Institute For Infocomm Research - Disclaimer -
This email is confidential and
!};
__END__
But why it still doesn't do the job?
If you don't mind you can try it.
The accompanying simple script for "compute_price.pl" can be found here:
http://rafb.net/paste/results/t6kbE092.html
Truly hope to hear from you again.
Regards,
Edward WIJAYA
I
this::
__BEGIN__
use Acme::Spork;
my $req_id = spork( sub { system("perl compute_price.pl -eml \"$uemail\"
-type $ct -unit $nu"); } )
or die qq {Could not fork for spork: $!};
__END__
Any idea?
--
Regards,
Edward WIJAYA
Institute For Infocomm Research - Discl
unit
$some_unit");
But while debugging for mycode.pl I can't see the value for under EMAIL
option,
while I can see the value for TYPE and UNIT option.
What's wrong with it?
--
Regards.
Edward WIJAYA
SINGAPORE
Institute For Infocomm Research - Disclaimer
trategy to achieve all these steps?
PS. actually I do have the script ready, and it is accessible here:
http://defiant.i2r.a-star.edu.sg/~ewijaya/MyTest/cgi-bin/mail_result.cgi
But it still doesn't do the job as I mentioned above.
--
Regards,
Edward WIJAYA
SINGAPORE
Institu
BEGIN__
sub mismatches {
my($source, $target) = @_;
my @sparts = ($source =~ /(\[.*?\]|.)/g);
my @tparts = ($target =~ /(\[.*?\]|.)/g);
scalar grep $tparts[$_] !~ /^$sparts[$_]/, 0 .. $#sparts;
}
__END__
Where did I go wrong? I humbly seek advice.
Regards
Edward WIJAYA
-
Hi,
> It's probably slower and higher memory usage, but it seems to make
> sense.
> Any one else have suggestions on how to keep the args straight?
>
I would document my functions first. Pod is good.
The hash ref idea is good for constructors with lots of optional params.
> Hi,
>
> To run/use Split function in the perl script , is it necessary to
> include/add any perl module ?
No no need. It is a built in function.
perldoc -f split
--
Regards,
Edward WIJAYAA
Institute For Infocomm Research - Disclaimer -
T
=head1 OPTIONS
=over 8
=item B<-help>
Print a brief help message and exits.
=item B<-man>
Prints the manual page and exits.
=back
=head1 DESCRIPTION
B will read the given input file(s) and do someting
useful with the contents thereof.
=cut
--
Regards,
Edward WIJAYA
SINGAPOR
Hi,
> How to extract the path of the file name in perl
use File::Basename
especially the method: fileparse()
Do: perldoc File::Basename
Regards,
Edward WIJAYA
--- I²R Disclaimer
--
This email is confidential
config file that needs edited. I'd try DL
> (the Perl.pm)
> the tar.gz and extract to disk then look for readme and/or
> installation
> (directions/instructions).
>
Still, I got the same error report.
Can't get it working.
Regards,
Edward WIJAYA
estion:
perl Makefile.PL CCFLAGS="$CCFLAGS -I$HOME/MyBioTool/libstree-0.4.2/include"
LDDLFLAGS="$LDDLFLAGS -L$HOME/
MyBioTool/libstree-0.4.2/lib"
But without any success.
It returns:
Note (probably harmless): No library found for -lstree
Writing Makefile for Tree::Suffix
Does
$source =~ /(\[.*?\]|.)/g );
my $mismatch_count
= scalar grep substr( $target, $_, 1 ) !~ /^$sparts[$_]/,
0 .. $#sparts;
return ( $mismatch_count, scalar(@sparts) );
}
sub enum {
return @{ $_[1] } unless --$_[0];
map {
my $nuc = $_;
map { $nuc .
q() ) {
push @seqs, $seq->seq();
} #end while
return [EMAIL PROTECTED];
}
Hope that helps.
Regards,
Edward WIJAYA
- Original Message -
From: chen li <[EMAIL PROTECTED]>
Date: Saturday, January 7, 2006 9:27 am
Subject: Re: new for reading file containing multiple records
>
There's probably no need for the plus in that case (after a =>)
--
Regards,
Edward WIJAYA
SINGAPORE
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
On Fri, 09 Dec 2005 19:46:56 +0800, Andrej Kastrin
<[EMAIL PROTECTED]> wrote:
but is there any solution to run it too.
ESC-X path/to/executable
or other alternative is to run it
under "e-shell" accessible through CTRL-C-D.
--
Regards,
Edward WIJAYA
SINGAPORE
--
To uns
PPV',
'sASP',
]
);
$te->parse($temp_file);
my @all_table_content = $te->tables;
# Here to extract the 'last' row
my @total = @{ $all_table_content[0]->[-1] };
print Dumper [EMAIL PROTECTED] ;
__END__
---
Regards,
Edward WIJAYA
SINGAPORE
--
.
Read this comment by Randall Schwartz,
http://www.perlmonks.org/index.pl?node_id=479799
Hope it gives you a hint ...
---
Regards,
Edward WIJAYA
SINGAPORE
--
This email is confidential and may be privileged. If you are not the intended
recipie
,
and number of strings enclosed by the bracket can consist up to 4 bases, i.e.
[ATCG].
--
Regards,
Edward WIJAYA
SINGAPORE
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
cific (like \r).
To view the hidden string you can use this
command: cat -A filename.txt
Then in Perl you can remove them using regex:
sub remove_trailing_newline {
$_[0] =~ s/[\r\n]+\Z//;
}
Hope that helps.
--
Regards,
Edward WIJAYA
SINGAPORE
--
To unsubscribe, e-mail: [EMAIL PRO
}'
Hope to hear from you again.
--
Regards,
Edward WIJAYA
SINGAPORE
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
Check this out:
http://www.perlmonks.org/?node=Tutorials#datafiles
--
Regards,
Edward WIJAYA
- Original Message -
From: Manish Uskaikar <[EMAIL PROTECTED]>
Date: Wednesday, November 9, 2005 1:53 pm
Subject: Connecting to a database using perl
> Hi,
>
> I am a real newb
Dear John,
Just small correction in the input sample.
my @ar5 = qw(GTATG-4 TGGGT-1);
should be this:
my @ar5 = qw(GTATG-4 TGGGT-7);
In short they are already ordered.
--
Regards,
Edward WIJAYA
SINGAPORE
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
s/i ) {
$id += $-[ 0 ];
substr( $str, $id, length $subs ) =~ tr/A-Z/a-z/;
}
}
$str =~ s/([a-z]+)/[\U$1\E]/g;
return $str;
}
print "\n";
__END__
--
Regards,
Edward WIJAYA
SINGAPORE
On Fri, 28 Oct 2005 18:42:11 +0800, John W. Krah
$ar )
{
my $idx = index($str,$subs);
my $bgn = $idx;
my $end = $idx+$slen+1;
substr($str,$bgn,0,"[");
substr($str,$end,0,"]");
}
print "$str\n";
return ;
__END__
Really hope to hear from you again.
---
Regards,
Edward WIJ
'BCDE',
'CD',
'CDE',
'DE' ];
Later, I also want to extend this
to deal with AoA as an input. But with
the same concept.
Is there an efficient way to achieve it?
I truly do not know how to go about
ints: 2.56
Read: perldoc perlretut.
Hope that helps
--
Regards,
Edward WIJAYA
SINGAPORE
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
ample snippet to measure total memory used up
with our script.
Hope that helps.
--
Regards,
Edward WIJAYA
SINGAPORE
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
Hi Mark,
> >
>
> Edward, for a beginner, would you mind explaining what the
>(1 .. $#arr)
$#arr is the index of the last element in the array
> and qw actually do in this code.? Cheers
with "qw" you are treating values inside as individual words
automatically
arr[$_]\n";
}'
prints:
b
c
Is that what you want?
--
Regards,
Edward WIJAYA
SINGAPORE
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
X' => 1,
'BY' => 1,
'BZ' => 1,
'CW' => 1,
'CX' => 1,
'CY' => 1,
'CZ' => 1,
'AWW' => 1,
'AWX' => 1,
'AWY' => 1,
'AWZ' => 1,
'AXW' => 1,
'AXX
-MPOSIX=strftime -e '
my $time = time;
$time -= 24*60*60*( strftime('%u', localtime($time)) - 1);
print strftime ':%y%m%d',
'
> Any ideas what I'm doing wrong?
>
Regards,
Edward WIJAYA
SINGAPORE
--
To unsubscri
quot;Array Size: $asize\n"; print Dumper $aref;'
Prints:
Array Size: 3
$VAR1 = [
1,
2,
[
'a',
'b',
'c',
'd'
]
];
--
Regards,
Edward WIJAYA
SINGAPORE
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
> Hi
Hi
> output. What am I missing?
Perhaps this is what you want?
sub func {
my $h = shift;
for $k (keys %$h)
{
print "$k\n";
for $n ( keys %{ $h->{$k} } )
{
print "$n => $h->{$k}{$n}\n";
}
Read: perldoc perldsc
Hope
Dear John,
Thanks so much for your snippet.
It's been really really helpful.
> I guess you didn't see Chris' posting. :-)
I'm really sorry.
Will try to be more attentive next time.
---
Regards,
Edward WIJAYA
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For addi
Hi John,
I was testing your code below with this array:
my @x = qw( * * A B C D );
but how come in the end it gives:
* XA * XB XC XD X
instead of
* * XA XB XC XD
--
Regards,
Edward WIJAYA
SINGAPORE
- Original Message -
From: "John W. Krahn" <[EMAIL PROTECTED]&
x27;,'*'); # returns: ['AB', 'BA','CB','*']
my @array3 = ('A','B','C','D'); # returns: ['AB', 'BA', 'CB','DC']
my @result = get_array(@array);
print Dumper [EMAIL PR
erl -e '
open FH, ";
close FH or die $!;
foreach $i (($#lines - $n) .. $#lines) { print "$lines[$i]\n";}
'
--
Regards,
Edward WIJAYA
SINGAPORE
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
You can find everything you need in:
perldoc perldsc
--
Regards,
Edward WIJAYA
SINGAPORE
>
> can anybody help me with a link or a tutorial for
> understanding the Datastructures in perl.
>
> Example, Array of Array, Hash of Array, Hash of Hash,
> Array of Hash.
--
To u
On Mon, 04 Jul 2005 17:31:03 +0800, Tielman Koekemoer (TNE)
<[EMAIL PROTECTED]> wrote:
After I passed a hash ref to a subroutine, how can I see what the hash
name was? i.e.:
I don't think that's possible. Why do you need that?
--
Regards,
Edward WIJAYA
SINGAPORE
--
To uns
> and i want to append(or i should say merge) these blocks and get a
> file like this:
> aaabbbccc
> aaabbbccc
I've asked the same question some time ago,
check this out:
http://groups-beta.google.com/group/perl.beginners/browse_thread/thread/4f28012f744d10e0/7638b6eb94a626d
Which version are you using?
Check the standard CPAN site, you will find:
http://search.cpan.org/~jrogers/Net-Telnet-3.03/lib/Net/Telnet.pm
HtH
--
Regards,
Edward WIJAYA
SINGAPORE
- Original Message -
From: MEENA SELVAM <[EMAIL PROTECTED]>
Date: Tuesday, June 21, 2005 12:29 pm
S
Day by IN\n";
print Dumper \%group_day_in ;
print "Group Day by Out\n";
print Dumper \%group_day_out ;
__DATA__
ID In Out Day
1 5 2 1
2 4 9 2
3 3 3 2
4 6 7 3
5 5 0 5
6 7 9 3
7 8 9 4
8 6 6 4
--
Regards,
Edward WIJAYA
SINGAPORE
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
the Hash with key "flinstones" ---> @{$array_ref}
is dereferncing an array $array_ref
2. Thus you have an array of that hash (i.e. flinstones as key).
3. Finally you push "wilma" and "betty" into that array
Hope it's clear.
---
Regards,
Edward WIJAYA
S
re sensible to me? Which also works.
> recursive(0);
--
Regards,
Edward WIJAYA
SINGAPORE
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
ectories
closedir(DIR);
foreach (@subdirs) { # Process subdirectory files
push(@out,$path.$_.$delim."\n");
proc_files($path.$_.$delim);
proc_dirs("$path$_$delim"); # RECURSIVE CALL
}
}
__END__
--
Regards,
Edward WIJAYA
SINGAPORE
Hi,
ever
Dumper;
my %hash;
my $sub_length = 2;
while () {
chomp;
for my $j (0 .. length - $sub_length)
{
push @{$hash{$j}}, substr $_, $j, $sub_length;
}
}
print Dumper \%hash;
foreach my $hkey (keys %hash)
{
foreach my $i ( 0 .. $#{ $hash{$hkey} } )
{
print "$hash{$hkey}[$i]
After second thought
This line:
my @y = grep { $_ if ($_ =~ /\d+/)} @list;
could be simplified with this:
my @y = grep { /\d+/ } split(/\s+/,$file);
Since grep { $_ if /\d+/ } wouldn't match on 0, but grep /\d+/ would.
I'm still wondering how can I do that with "unpack" :-
=~ /\d+/)} @list;
print Dumper [EMAIL PROTECTED];
__END__
Gives:
$VAR1 = [
'12',
'1',
'12.435',
'13.66',
'34.6',
'32.1',
'32'
];
Hope that's what yo w
Charles,
On Sat, 7 May 2005 14:50:37 -0500, Charles K. Clarkson
<[EMAIL PROTECTED]> wrote:
plain scary. (Wait, I think _she_ wrote that module, too. Just stay
away from _her_. :)
_HE_ you mean! :-)
http://www.abigail.nl/
--
Regards,
Edward WIJAYA
Singapore
--
To unsubscribe, e-mail:
er apart from your suggestion, this also worked:
my $iter = Algorithm::ChooseSubsets->new([ sort keys %hoa], 2, 1);
Thanks so much.
---
Regards,
Edward WIJAYA
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
my $value = reverse (join '', map $_->[$i], @[EMAIL
PROTECTED]);
push @{$hoa{$composite_key}}, $value;
}
}
return %hoa;
}
--
Regards,
Edward WIJAYA
SINGAPORE
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
Fo
with single key
for my $key (keys %hoa )
{
$new_hoa{$key} = $hoa{$key};
}
# This is an idiot way (manual) to do it and it's not dynamic
# i.e. only satisfy for %set_hoa1
# How can I construct automatically so that it may apply to va
--- Alex Lisbaron <[EMAIL PROTECTED]> wrote:
> How can I install this package on WIN2K?
Use PPM, like:
dos-prompt> ppm
then
ppm> install DFA-Simple
---
Regards,
Edward WIJAYA
SINGAPORE
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL P
This is the reading suggested when I asked the same questions some time ago .
http://perldoc.perl.org/perlfaq8.html#What-s-the-difference-between-require-and-use-
---
Regards,
Edward WIJAYA
SINGAPORE
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
_score;
my $offset = 0;
[snip]
my $idx = index($str, $frag, $offset) + 1;
[snip]
$offset = $idx;
Don't mean to nitpick.
Just wondering if it's possible to modify Krahn's snippet to accomodate
the overlapping cases?
yet another fans request ;-)
--
Edward WIJAYA
Singap
my $idx = index($str, $frag) + 1;
for my $pos ($idx .. $idx + (length($frag) - 1)) {
$position_score{$pos} = 1;
};
};
my $total_score = 0;
for my $score (values %position_score) {
$total_score += $score;
};
return $total_score;
};
__END__
--
Edward WIJAY
On Sun, 27 Mar 2005 20:28:42 +0800, Manish Sapariya <[EMAIL PROTECTED]>
wrote:
Hi list,
Hi
How do I know whether a given module is installed on
machine or not?
perl -MModule::Name -e 'print "it is installed\n";'
or it's simpler variant
perl -MModule::Name -e1
Dear Steven,
Sorry, don't mean to nitpick.
On Sat, 26 Mar 2005 23:09:26 +0800, Steven Schubiger
<[EMAIL PROTECTED]> wrote:
On 26 Mar, Edward Wijaya wrote:
It's fine, as it is. Typedefs most often reside in header files,
although, they can be used in the main file without suf
int j;
y = x = xx;
tmp= x+5.5;
tmp -= (x+0.5)*log(tmp);
ser=1.0190015;
for (j=0;j<=5;j++) ser += cof[j]/++y;
return -tmp+log(2.5066282746310005*ser/x);
}
--
Edward WIJAYA
Singapore
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTE
Hi Steven,
On Sat, 26 Mar 2005 22:08:44 +0800, Steven Schubiger
<[EMAIL PROTECTED]> wrote:
Try "long double" instead, which gives you 10 Bytes and
the format char %Lf.
Still wont' do. It still return 'inf' for N>500
--
Edward WIJAYA
Singapore
--
To unsubscr
e around 1000-2000.
Any other possibility?
--
Edward WIJAYA
Singapore
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
-0.5395239384953e-5};
int j;
y = x = xx;
tmp= x+5.5;
tmp -= (x+0.5)*log(tmp);
ser=1.0190015;
for (j=0;j<=5;j++) ser += cof[j]/++y;
return -tmp+log(2.5066282746310005*ser/x);
}
#-End of My Code--
--
Edward WIJAYA
Singapore
--
To unsubscribe, e-mail: [EMAIL PRO
On Tue, 15 Mar 2005 02:29:06 +0800, John W. Krahn <[EMAIL PROTECTED]> wrote:
Edward Wijaya wrote:
[snip]
Here is one way to do it:
my %files;
for ( @ARGV ) {
next unless /(.+)\.(?:fa|rs)$/;
push @{ $files{ $1 } }, $_;
}
for my $base ( keys %files ) {
if ( @{ $files{
um (@sum){
print "$sum\n";
}
__END__
How can I make my code above such that it can take all multiple files
iteratively? to give output sth like this:
data1
sum_of_elements from data1.fa and data1.rs
data2
sum_of_elements from data2.fa and data2.rs
--
Edward WIJAYA
Singapore
--
To unsubs
e directory? For example,
will there sometimes be a data14R.fa file and no
corresponding data14P.fa file?
No, there will always be a corresponding file.
i.e. *R.fa always have its *P.fa file
Will there be other files located in this directory?
Yes, but they won't be any other *R.fa *P.fa type.
Hi,
How can I modify the early part of code below
such that I don't have to manually key in the files this way:
perl mycode.pl data1P.fa data1R.fa data2P.fa data2R.fa etc
I.e. just by typing this will do:
perl mycode.pl
Thanks so much for your time beforehand.
--
Edward WIJAYA
Sing
ontents before the directories themselves.
BTW your code would have been clear, btw, if you'd said, for example:
rename $old, $new or warn "rename: $!\n";
also, "$new = lc $old" is more readable than $new = "\L$old"
My suggestion is untested, it'l
/search.cpan.org/~mschwartz/OLE-Storage-0.386/tools/lhalw
Of course it's rather outated.
HtH
--
Regards,
Edward WIJAYA
Singapore
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
approach?
Hopefully this question is not far off topic.
Thanks a lot beforehand.
--
Edward WIJAYA
Singapore
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
blem occur.
Any idea?
Thanks so much beforehand.
--
Edward WIJAYA
Singapore
__BEGIN__
#!/usr/bin/perl -w
use strict;
use Benchmark 'cmpthese';
my @array = qw(flow loop pool Wolf root sort tour);
#The script runs ok if I remove this 'cmpthese' snippet
cmpthese (-5, {ra
On Fri, 21 Jan 2005 10:47:33 +, Andrew Black
<[EMAIL PROTECTED]> wrote:
Is there a module to extract the real email address from a header. e.g.
Yes there is "Email::Find"
Why would you want to extract email addresses? Spamming?
--
Edward WIJAYA
Singapore
--
To unsubscribe
On Fri, 14 Jan 2005 09:47:50 -0800, John W. Krahn <[EMAIL PROTECTED]> wrote:
Perl has a FAQ on shuffling, have you read that yet?
perldoc -q shuffle
or
use CPAN module: List::Util
it has a built in *shuffle* function.
--
Edward WIJAYA
Singapore
--
To unsubscribe, e-mail: [EMAIL PROTECTE
_distance_jkrahn1 { my $ret = ( $_[0] ^ $_[1] ) =~ tr/\0//;
$ret }
sub hamming_distance_jkrahn2 { my $ret = () = ( $_[0] ^ $_[1] ) =~ /\0/g;
$ret }
__END__
--
Edward WIJAYA
Singapore
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
etween these two?
sub hamming_distance_string { ( $_[0] ^ $_[1] ) =~ tr/\0// }
sub hamming_distance_string { () = ( $_[0] ^ $_[1] ) =~ /\0/g }
PS: Thanks to Ted and Jenda for the response as well.
--
Edward WIJAYA
Singapore
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [E
Thanks so much for your time.
And wishing you all a very Happy and Prosperous New Year 2005!
--
Regards,
Edward WIJAYA
Singapore
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
e State:
Dos> PPM
then:
ppm> install Module-Name
HtH
--
Regards,
Edward WIJAYA
Singapore
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
/search.cpan.org/dist/Plucene/lib/Plucene.pm
It is a search engine in itself.
HtH
--
Regards,
Edward WIJAYA
Singapore
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
1 - 100 of 966 matches
Mail list logo