RE: Printing to 2 destinations with one statement in Windows

2002-06-07 Thread Hanson, Robert
I can think of a few approaches... 1. write a subroutine to do this. 2. write a source filter (http://www.samag.com/documents/s=1287/sam03030004/) 3. use tie I would probably choose the third. It is possible to create a module that you simulate a filehandle (or hash, or array, etc). The short

RE: PerlScript Sans VBScript/Javascript

2002-05-20 Thread Hanson, Robert
a) Has anybody observed any **serious** performance degradation with PerlScript engine of AS? I haven't worked with PerlScript in ASP for two years now, but never saw *any* performance problems when I did... well except for DB connections not closing, but that was my fault. b) Anybody observed

RE: encrypt a module?

2001-12-18 Thread Hanson, Robert
You want to use a source filter. The source filter is a Perl module that filters the module before it is run, so it could be used to show/hide debugging info, or in your case decrypt it. The Perl Journal had a good article on it a while ago, check it out and then see what pre-built filters are

RE: Download a file from the web

2001-12-09 Thread Hanson, Robert
If all you want to do is download the file, try this... # Tested use LWP::Simple; my $localfile = 'myfile.pdf'; my $remotefile = 'http://historychannel.aestaging.com/egypt/EgyptTeacherGuide.pdf'; open OUT, $localfile; binmode OUT; print OUT get($remotefile); close OUT; Rob -Original

RE: Regular expression help

2001-11-29 Thread Hanson, Robert
You don't even need a regex although you could use one... # untested my $num = 92739874598745; $num =~ /^(\d*)(d{4})(\d{5})$/; my ($n1, $n2, $n3) = ($1, $2, $3); Or you could do this... # untested my $num = 92739874598745; my $n1 = substr($num, 0, length($num) - 9); my $n2 = substr($num, -9,