[11836] in Perl-Users-Digest
Perl-Users Digest, Issue: 5436 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Apr 21 02:07:23 1999
Date: Tue, 20 Apr 99 23:00:16 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 20 Apr 1999 Volume: 8 Number: 5436
Today's topics:
Re: Fork() and defunct state problem <dumar@mailexcite.com>
Help with PerlShop please (DmmmD)
Re: How can I execute non cgi PERL script under NT? (David Efflandt)
How to interface with C duggaraju@excite.com
Re: is it possible "UPDATE tables SET ... WHERE ... "? (Abigail)
Re: Is it REALLY impossible to install Perl on Windoze? agniora@usa.net
Re: Is it REALLY impossible to install Perl on Windoze? <rjbyrd@webaccess.net>
Re: Perl fo win95 <rjbyrd@webaccess.net>
Re: Problem with writing to file. agniora@usa.net
Re: Problem with writing to file. (Tad McClellan)
programmer required <dnb@emmerce.com.au>
Q: perl process won't go away <ji1@home.com>
Re: scriptlet to add line breaks at even multiples? (David Efflandt)
Re: Tool Reuse Considered Beneficial (was: New FAQ: How <dgris@moiraine.dimensional.com>
Web-Based Uploading of Files <xuelun@ieee.org>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 21 Apr 1999 05:07:04 GMT
From: Dumar <dumar@mailexcite.com>
Subject: Re: Fork() and defunct state problem
Message-Id: <371D5CF6.F0425BC2@mailexcite.com>
Hi;
William Blasius #42722 wrote:
> > Everything seems fine, the problem is, when you kill the child process
> > (that was created by fork()) or the child process terminates itself by
> > exit(1), you see that process in the <defunct> state and after sometime,
> > a lot of <defunct> processes exist around.
>
> A defunct (zombie) process uses no system resources except for its
> process table entry. To get rid of them, see
>
I know that, but when you have dozens of zombie processes, it doesn't really
looks nice. As I said, I am forking a lot of processes one after another and
after 1-2 hours, there are lots of zombie processes around. I created a second
script which only calls this script in a loop, so this first script checks how
many defunct processes there are and if there are certain number of zombies
around, it just exits.
Regarding wait, I need to do certain checks from the caller process (e.g. if
the child halts, e.g.). So I can't simply use wait.
Thanks ...
> perldoc -f wait
>
> hth
> Wm Blasius
> Stuttgart
> --
> ...now I'm <wm.blasius@ks.sel.alcatel.de> - no matter what my mail
> server says!
------------------------------
Date: Tue, 20 Apr 1999 22:07:28 -0600
From: drbenway@cybercom.net (DmmmD)
Subject: Help with PerlShop please
Message-Id: <drbenway-2004992207280001@192.168.1.4>
Hello,
I just recently installed version 3.1 on my server, my first exposure to
Perl and the script. I can't seem to get the script to work properly so I
did a news search on deja news to see if anyone else was having the same
problem.
Well, I found a close description of my problem. The only difference is
that I have never been able to get the script to work properly.
> Hello Perl Guru's:
>
>I have a question regarding a Perlshop problem that has cropped up. I've
>had this great free program installed on my website and running
>flawlessly for 5 months when suddenly it went down, inexplicably,
>without any changes to the set-up on my part. The server, 9netave out of
>N.J. says that many people have been encountering the same error, out of
>the blue, which reads:
>
>"Invalid Transmission #3 received from: xxx.xxx.xxx.xx If your
>connection was interrupted, you must Enter the shop from the beginning
>again."
One useful reply was:
>Check your enter store page and the passing of your order id. #3 is because of
>the the order id. Somewhere your script is dropping the order id which is your
>token. Check you token directory when you enter the cart see if it shows up
>with a new one. View your source, check the directory and match your id's up.
>Make sure your getting a new id when you enter unless you have cookies.
I'm not sure I completely understand the reply, but I do have cookies
turned on. And I looked in the token directory and did not see anything.
How do I match up id's?
Here is the HTML I am using to enter the script. I got it from the
PerlShop manual.
<FORM ACTION="http://www.cdrproductions.com/cgi-bin/PerlShop/PerlShop.cgi"
METHOD="POST">
<INPUT TYPE=Submit NAME="dummy" VALUE="ENTER">
<INPUT TYPE=Hidden NAME="thispage" VALUE="page1.html">
<INPUT TYPE=Hidden NAME="ACTION" VALUE="Start Shopping">
<INPUT TYPE=Hidden NAME="ORDER_ID" VALUE="!ORDERID!">
</FORM>
Can somebody please help me solve this problem?
Thanks for any help you might be able to provide. Email appreciated.
------------------------------
Date: 21 Apr 1999 04:49:07 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: How can I execute non cgi PERL script under NT?
Message-Id: <slrn7hqm3b.ji.efflandt@efflandt.xnet.com>
On Tue, 20 Apr 1999 15:12:40 -0500, Alejandro Eluchans
<alejandro.eluchans@umb.edu> wrote:
>I got Perl Builder for NT and it works great.
>
>Now, I need to run my PERL scripts (under Win NT) independently of any
>web server or PERL utility.
>Maybe using DOS line command (like UNIX) or maybe double clicking on a
>(.exe) icon?
>How do I get the PERL interpreter to "compile" my script?
I never used NT, but in Win95 is is as simple as associating the '.pl'
file extension with perl.exe. Then you simply double click on the file in
Explorer (the file thing, not MSIE) and perl runs it. Of course you
cannot enter any parameters that way, but you can get input from STDIN.
But I gave up on that long ago and run it in Linux instead, where
everything works as intended.
>Thanks,
>
>Alejandro
--
David Efflandt efflandt@xnet.com
http://www.xnet.com/~efflandt/
------------------------------
Date: Wed, 21 Apr 1999 05:08:05 GMT
From: duggaraju@excite.com
Subject: How to interface with C
Message-Id: <7fjmfk$74q$1@nnrp1.dejanews.com>
Hi all, I would like to know if it is possible to call a C function
from a perl script as I require it badly. If it is not possible what are the
other alternatives.
thanks in advance,
prakash.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 21 Apr 1999 04:55:51 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: is it possible "UPDATE tables SET ... WHERE ... "?
Message-Id: <7fjlon$2mn$1@client2.news.psi.net>
=?euc-kr?B?udrBvrq5IChQYXJrLCBKb25nLVBvcmsp?= (okmail@hanmail.net) wrote
on MMLIX September MCMXCIII in <URL:news:7fjbtn$f0v$1@news2.kornet.net>:
## SSB0cmllZCBmb3IgdGhpcy4gYnV0IGZhaWxlZC4NCg0KJHN0aD0kZGJoLT5wcmVwYXJlKCINClVQ
## REFURSB0YWJsZTEsIHRhYmxlMiBTRVQgbmFtZT0nTmFtZScsIGFkZHJlc3M9J3NvbWV3aGVyZScg
## V0hFUkUgdGFibGUxLklEID0gdGFibGUyLklEDQoiKTsNCiRzdGgtPmV4ZWN1dGU7DQoNCg0KdGFi
## bGUxIGhhdmUgbmV4dCBmaWxlZHMuDQppZCwgbmFtZQ0KDQp0YWJsZTINCmlkLCBhZGRyZXNzDQoN
## CmJvdGggdGFibGUxLmlkIGFuZCB0YWJsZTIuaWQgaXMgcHJpbWFyeSBrZXkgYW5kIHJlbGF0aW9u
## ZWQuDQoNCkhvdyBDYW4gSSBVcGRhdGU/DQoNClRoeC4NCg0KDQoNCg==
##
Well, REFURS BOY, that didn't quite compile. However, with this articles
quoting style, it will.
But your program has nothing to do with the question in the title. The
answer is NO. update() is not a Perl primitive, and there are no plans to
make it one. Furthermore, current Perls only allow one statement modifier,
not two. Lastly, you cannot omit the funny symbol in front of a variable.
You should write: @tables.
If you would patch your version of Perl to allow the primitive update(),
you should write your code as:
where (...) {
update @tables set ...;
}
Abigail
--
perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164".
"\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162".
"\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'
------------------------------
Date: Wed, 21 Apr 1999 04:12:24 GMT
From: agniora@usa.net
Subject: Re: Is it REALLY impossible to install Perl on Windoze???
Message-Id: <7fjj76$4mm$1@nnrp1.dejanews.com>
In article <MPG.1186ed807b2b64c2989691@news.supernews.com>,
mjw@bahnhof.se wrote:
> I am getting really mad.
>
> More times than I want to remember I tried to install Perl
> under Win95, on three different machines:
> 1. My humble, hopelessly obsolete Pentium 133 MHz
> 2. Compaq Armada 233 MHz notebook in my office
> 3. A Dell desktop PC in my office.
>
> I used various builds of Perl. I tried many times to
> carry out every installation. I tried every conceivable
> measures, deactivated antivirus programs (WHY, ON EARTH,
> IS IT NECESSARY???), switched off the lights in my room,
> prayed to God and so on.
>
> NOTHING. NULL. ZERO SUCCESS.
>
> The ActiveState installation program freezes always
> when "preparing HTML documentation", at 95%, leaving
> the installation unfinished (I believe that 60 min
> waiting for the program to continue - was enough...).
>
> Ok. I bought a book "Perl 5 Complete" from Mc Graw-Hill,
> a respectable publishing house. I inserted the attached
> CD-ROM into my computer and started installation -
> perhaps not the latest build, but presumably "stable".
>
> The installation program showed to be a worthless piece
> of crap, completely broken, unusable. Probably nobody
> ever tested it.
>
> Is there anything I can do before I start hating Perl
> and send millions of anti-Perl spam messages on the whole
> net?
>
> What the hell can go wrong in an installation program
> that does little more than copying files and writing
> some info in the registry?
>
> Is it really impossible for the Perl community to prepare
> a package for MANUAL installation, with all files neatly
> packed, together with the directory tree, in a ZIP archive
> or similar, ready to copy "as is"?
>
> Regards
> MJ Wiechowski
>
hmm... i once had trouble with ActivePerl and later i found out that it runs
out of hard disk spaces. it takes something above 100megs it seems. have u
checked ur hard disk space?
agniora
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Tue, 20 Apr 1999 23:04:00 -0600
From: "Robert Byrd" <rjbyrd@webaccess.net>
Subject: Re: Is it REALLY impossible to install Perl on Windoze???
Message-Id: <371d3eaa.0@news.webaccess.net>
You can get Perl for Win95 (Build 515) at http://www.activestate.com/. To
get CGI running, execute the Perl script located at
http://www.access.digex.net/~jurlwin/ -- download and execute the script
located under the section "Hints to get CGI under NT/95 running" to get CGI
running under Microsoft's Personal Web Server found in Option Pack 4.
Download and rename the iis_install.pl.txt to iis_install.pl and execute the
file (double click on iis_install.pl after installing ActivePerl) to update
your registry. Works great!
You should also visit Microsoft's site first and make sure you have the
latest Win95 patches at
http://www.microsoft.com/windows/ie/ie40/download/rtw/x86/en/download/addon9
5.htm -- You can also go to http://www.microsoft.com/windows95/downloads/
for updates and service releases. Also, I'd recommend installing IE 4.0 SR2
before installing ActivePerl.
Rob...
mjw@bahnhof.se wrote in message ...
>I am getting really mad.
>
>More times than I want to remember I tried to install Perl
>under Win95, on three different machines:
>1. My humble, hopelessly obsolete Pentium 133 MHz
>2. Compaq Armada 233 MHz notebook in my office
>3. A Dell desktop PC in my office.
>
>I used various builds of Perl. I tried many times to
>carry out every installation. I tried every conceivable
>measures, deactivated antivirus programs (WHY, ON EARTH,
>IS IT NECESSARY???), switched off the lights in my room,
>prayed to God and so on.
>
>NOTHING. NULL. ZERO SUCCESS.
>
>The ActiveState installation program freezes always
>when "preparing HTML documentation", at 95%, leaving
>the installation unfinished (I believe that 60 min
>waiting for the program to continue - was enough...).
>
>Ok. I bought a book "Perl 5 Complete" from Mc Graw-Hill,
>a respectable publishing house. I inserted the attached
>CD-ROM into my computer and started installation -
>perhaps not the latest build, but presumably "stable".
>
>The installation program showed to be a worthless piece
>of crap, completely broken, unusable. Probably nobody
>ever tested it.
>
>Is there anything I can do before I start hating Perl
>and send millions of anti-Perl spam messages on the whole
>net?
>
>What the hell can go wrong in an installation program
>that does little more than copying files and writing
>some info in the registry?
>
>Is it really impossible for the Perl community to prepare
>a package for MANUAL installation, with all files neatly
>packed, together with the directory tree, in a ZIP archive
>or similar, ready to copy "as is"?
>
>Regards
>MJ Wiechowski
------------------------------
Date: Tue, 20 Apr 1999 22:45:31 -0600
From: "Robert Byrd" <rjbyrd@webaccess.net>
Subject: Re: Perl fo win95
Message-Id: <371d3a56.0@news.webaccess.net>
You can get Perl for Win95 (Build 515) at http://www.activestate.com/. To
get CGI running, execute the Perl script located at
http://www.access.digex.net/~jurlwin/ -- download and execute the script
located under the section "Hints to get CGI under NT/95 running" to get CGI
running under Microsoft's Personal Web Server found in Option Pack 4.
Download and rename the iis_install.pl.txt to iis_install.pl and execute the
file (double click on iis_install.pl after installing ActivePerl) to update
your registry. Works great!
Rob...
Igor Daudt wrote in message ...
> Do you know where can I download full version of perl for win95?? I'd
>like to install that in my computer...
>
>Igor Daudt
> igdaudt@conex.com.br
>
>
------------------------------
Date: Wed, 21 Apr 1999 03:57:10 GMT
From: agniora@usa.net
Subject: Re: Problem with writing to file.
Message-Id: <7fjial$3ru$1@nnrp1.dejanews.com>
In article <371C4105.257C6EAA@nospam.technologist.com>,
Michael Cameron <Michael.Cameron@nospam.technologist.com> wrote:
> One change (adding the shebang line which I assume you have, why not post
> the *whole* script)
> It works fine for me using perl, version 5.004_04 built for i386-linux.
> You may need to post more detail to get more help...
>
> HTH,
> Michael Cameron
well the whole code is a little big though. hope noone minds me posting such a
long piece of code. :o)
use Date::Calc qw(Days_in_Month Today Date_to_Days Decode_Date_US check_date
Delta_Days);
use POSIX;
sub menu {
print "\nAgni Billing System\n";
print "-------------------\n";
print "1) Select logfile.\n";
print "2) Produce Report.\n";
print "Q) Quitn\n";
print "Enter Choice :";
return uc substr(<STDIN>, 0, 1);
};
sub repmenu {
print "\nAgni Billing System (Produce Report)\n";
print "--------------------------------------\n";
print "1) Produce Summery Report.\n";
print "2) Produce Detail Report.\n";
print "Q) Return to main menu\n";
print "Enter Choice :";
return uc substr(<STDIN>, 0, 1);
};
sub press_a_key {
print "press Enter to return to menu\n";
<STDIN>;
}
# usage : get_logfilename default_value
sub get_logfilename {
print "Filename ".($_[0] eq "" ? "" : "[default $_[0]]").":";
chop (my $logfilename = <STDIN>);
$logfilename = $_[0] if ($logfilename eq "") or !(-e $logfilename);
return $logfilename;
}
# usage : get_value prompt default_value
sub get_value {
print $_[0].($_[1] eq "" ? "" : "[default $_[1]]").":";
chop (my $value= <STDIN>);
$value = $_[1] if ($value eq "") or !(-e $logfilename);
return $value;
}
sub get_ldate {
my @linearray;
my $logfile = $_[0];
my $count = 0;
open LOGFILE, $logfile;
#read each line and load dates to an array.
while (<LOGFILE>) {
@linearray = split (/, /,$_);
$adate[$count++] = $linearray[0];
}
@adate = sort @adate; # sort the date array.
print "Logfile Selected to be : $logfile\n".
"The first date in file is : $adate[0]\n".
"The last date in file is : $adate[$count-1]\n";
close LOGFILE;
@retval = ($adate[0],$adate[$count-1]);
}
# Name : calculate_amount
# usage : calculate_amount ($date, $time, $duration)
# return value : calculated bill for that login.
sub calculate_amount {
my($ldate, $ltime, $ldur) = @_;
my($count, $subtotal);
$subtotal = 0;
@timearray = split(/:/,$ltime);
@etimearray = addtime($ltime,"00:00:".$ldur);
open (RATES, "rates.txt") or die ('rates.txt file is missing');
@ratearray = <RATES>;
$durm = ceil($ldur/60);
$timearray[1] =~ s/ //g;
if (FindDay(split(/\//,$ldate)) eq 'Fri') {
$subtotal += $durm }
elsif (($timearray[0] <= $etimearray[0]) && ($durm <= 600)) {
if (($timearray[0] >= 8) && ($etimearray[0] < 18)) {
$subtotal += 2.5 * $durm }
elsif (($timearray[0] >= 18) && ($etimearray[0] <= 23)) {
$subtotal += 2 * $durm }
elsif (($timearray[0] >= 0) && ($etimearray[0] < 8)) {
$subtotal += $durm }
else {
for ($count=1; $count <= $durm; $count++) {
$subtotal += $ratearray[$timearray[0]];
@timearray = addtime (join(':', @timearray), "00:01:00");
}
}
}
else {
for ($count=1; $count <= $durm; $count++) {
$subtotal += $ratearray[$timearray[0]];
@timearray = addtime (join(':', @timearray), "00:01:00");
}
}
return $subtotal;
}
# Name : addtime
# Usage : addtime (time1, time2) where time1 and time2 are hh:mi:ss
# return value : totaltime in hh:mi:ss format.
sub addtime {
my($time1, $time2) = @_;
my(@a3);
@a1 = split(/:/,$time1);
@a2 = split(/:/,$time2);
$a3[2] = ($a1[2]+$a2[2]) % 60;
$a3[1] = ($a1[1]+$a2[1]+
(int ($a1[2]+$a2[2])/60)) % 60;
$a3[0] = (int ((int ($a1[2]+$a2[2])/60)+$a1[1]+$a2[1])/60
+$a1[0]+$a2[0]) % 24;
return @a3;
}
#sub ceil { ($_[0] != int $_[0]) + int $_[0] }
sub floor { int $_[0] }
#Name : FindDay
#Usage : FindDay (@Date)
# where @Date is an array with the values (mm,dd,yy) or (mm,dd,yyyy).
#Returns : A three-character string of the day of the given date.
sub FindDay {
($m, $d, $y) = @_;
$y += 1900 if $y <100;
@d = (0,3,2,5,0,3,5,1,4,6,4,2,4);
@day = (Sun,Mon,Tue,Wed,Thu,Fri,Sat);
$y-- if $m < 3;
$day = $day[($y+int($y/4)-int($y/100)+int($y/400)+$d[$m-1]+$d)%7];
#print $day;
}
#### BEGIN MAIN MODULE #### $logfilename = ""; while ($choice ne 'Q') {
$choice = menu; if ($choice eq "1") { $logfilename = get_logfilename
($logfilename); next if ($logfilename eq ""); @ldate_range =
get_ldate($logfilename); }; if ($choice eq "2") { next if $logfilename eq
""; while ($repchoice ne 'Q') { $repchoice = repmenu; if (($repchoice eq
"1") or ($repchoice eq "2")) { #produce summery report
# read the startdate and the stopdate
$start_date = get_value "Start Date :", $ldate_range[0];
$stop_date = get_value "Stop Date :", $ldate_range[1];
next if ($start_date < $ldate_range[0])
or ($stop_date > $ldate_range[1])
or !(check_date Decode_Date_US $start_date)
or !(check_date Decode_Date_US $stop_date);
# read the username
$username = "";
$username = get_value "Username " while $username eq "";
$outfile = "STDOUT";
$outfile = get_value "Output filename ",$outfile;
open (OUTFILE, ">".$outfile) unless $outfile eq "STDOUT";
select OUTFILE unless $outfile eq "STDOUT";
#read a line from logfile.
open LOGFILE, $logfilename;
$total = 0; $usage = 0; $durm = 0; $totdur = 0;
print ("\nLOGIN : $username Filename : $logfilename\n\n");
print ("Date Time Duration Usage\n") if $repchoice eq "2";
print ("---------------------------------------\n") if $repchoice eq
"2";
while (<LOGFILE>) {
@linearray = split(/, /,$_);
$linearray[2] =~ s/ //g;
next unless ((($username eq $linearray[2]) || ($username eq 'ALL'))
&& (Delta_Days((Decode_Date_US $start_date), (Decode_Date_US
$linearray[0])) >= 0)
&& (Delta_Days((Decode_Date_US $linearray[0]), (Decode_Date_US
$stop_date)) >= 0));
$usage = calculate_amount($linearray[0], $linearray[1],$linearray[3]);
$total += $usage;
$durm = ceil($linearray[3]/60);
$totdur += $durm;
### problem at the line below! (only during the last iteration though)
printf ("$linearray[0] $linearray[1] %5.0f %5.0f\n",$durm,$usage)
if $repchoice eq "2";
} #while <LOGFILE>
print ("---------------------------------------\n") if $repchoice eq
"2";
printf ("Duration : %7.2f\n",$totdur);
printf ("Usage : %7.2f\n",$total);
printf ("VAT(15%) : %7.2f\n",$total * 0.15);
printf ("Surcharge(5%) : %7.2f\n",$total * 0.05);
}
}
}
};
also keep a file called rates.txt in the same directory as the above program
and heres the contents of rates.txt :
1
1
1
1
1
1
1
1
2.5
2.5
2.5
2.5
2.5
2.5
2.5
2.5
2.5
2.5
2
2
2
2
2
2
1
and also a file like this needs to be also kept so that it can be provided
when the program prompts for a logfile. 04/01/99, 00:01:06, fhuq , 14
04/01/99, 00:01:18, bokul , 32 04/01/99, 00:01:12, bzpanpac , 86 04/01/99,
00:02:10, shuktara , 114 04/01/99, 00:03:10, mmintl , 118 04/01/99,
00:03:05, noorjuma , 138 04/01/99, 00:03:39, zishan , 117 04/01/99,
00:05:35, sshahnaz , 77 04/01/99, 00:05:49, hyderi , 73 04/01/99, 00:06:25,
topu , 39 04/01/99, 00:05:45, mrashid , 140 04/01/99, 00:07:27, nzaman ,
43 04/01/99, 00:06:09, rafat , 148 04/01/99, 00:07:38, kajol , 73 04/01/99,
00:07:37, tasrif , 81 04/01/99, 00:06:01, bobbo , 201 04/01/99, 00:01:52,
shamsm , 513 04/01/99, 00:10:13, tushar , 26 04/01/99, 00:10:11, bzpanpac ,
80 04/01/99, 00:11:19, iski , 40 04/01/99, 00:10:15, zishan , 136 04/01/99,
00:10:12, bbpaul , 153 04/01/99, 00:13:09, watsapha , 37 04/01/99, 00:11:12,
excon , 392 04/01/99, 00:09:13, hyq , 852 04/01/99, 00:09:28, khanwar ,
841 04/01/99, 00:20:25, wpashi , 337 04/01/99, 00:27:30, emef , 141
04/01/99, 00:14:21, tasrif , 1151 04/01/99, 00:33:29, dinn , 25 04/01/99,
00:34:07, zabir , 77 04/01/99, 00:31:26, tahmeed , 318 04/01/99, 00:24:02,
wingroup , 836 04/01/99, 00:38:17, michiko , 13 04/01/99, 00:38:32, pozaman
, 15 04/01/99, 00:39:03, shiblee , 65 04/01/99, 00:13:52, jowaher , 1583
04/01/99, 00:40:46, mitun , 34 04/01/99, 00:04:40, wasimm , 2204 04/01/99,
00:35:42, rrasool , 385 04/01/99, 00:39:57, fahim , 139 04/01/99, 00:40:52,
ziaul , 101 04/01/99, 00:42:05, ippab , 51 04/01/99, 00:39:24, rumky , 225
04/01/99, 00:42:56, nzaman , 35 04/01/99, 00:27:27, skabir , 1023 04/01/99,
00:43:07, wpashi , 113 04/01/99, 00:43:44, rrasool , 96 04/01/99, 00:43:50,
scanbdce , 131 04/01/99, 00:44:26, rumky , 125 04/01/99, 00:46:29, cynthia
, 35 04/01/99, 00:46:00, wpashi , 74 04/01/99, 00:44:43, fahim , 165
04/01/99, 00:47:56, scanbdce , 38 04/01/99, 00:48:26, sk_ak , 22 04/01/99,
00:48:43, ehaque , 35 04/01/99, 00:48:15, fahim , 118 04/01/99, 00:46:59,
polin , 209 04/01/99, 00:50:04, azrah , 102 04/01/99, 00:52:03, missouri ,
4 04/01/99, 00:44:40, ahmednf , 457 04/01/99, 00:45:57, phuda , 414
04/01/99, 00:52:43, cairndhk , 37 04/01/99, 00:44:00, futh , 574 04/01/99,
00:51:56, mrashid , 161 04/01/99, 00:53:17, tushu , 104 04/01/99, 00:54:02,
safeway , 77 04/01/99, 00:50:23, milton , 360 04/01/99, 00:50:31, ranju ,
403 04/01/99, 00:53:28, fahim , 260 04/01/99, 00:56:51, scanbdce , 66
04/01/99, 00:57:20, naheed , 44 04/01/99, 00:31:32, agi , 1598 04/01/99,
00:58:59, gds , 1 04/01/99, 00:12:31, shahzad , 2798 04/01/99, 00:55:19,
ehaque , 278 04/01/99, 00:58:40, fahim , 99 04/01/99, 00:58:03, milton ,
156 04/01/99, 00:37:09, prince , 1504 04/01/99, 01:01:17, rumky , 60
04/01/99, 00:11:59, rano , 3040 04/01/99, 01:00:49, ehaque , 112 04/01/99,
00:53:50, bithi , 564 04/01/99, 01:02:30, sonata , 53 04/01/99, 00:59:05,
agi , 263 04/01/99, 00:56:07, phuda , 538 04/01/99, 01:03:56, artekton , 97
04/01/99, 01:01:06, fahim , 288 04/01/99, 01:01:59, scanbdce , 263 04/01/99,
01:06:07, simon , 74 04/01/99, 00:56:46, mansur , 717 04/01/99, 01:08:50,
cmurphy , 53 04/01/99, 01:08:38, ratul , 143 04/01/99, 01:08:41, fahim ,
174 04/01/99, 01:11:56, naheed , 66 04/01/99, 00:46:43, prodip , 1597
04/01/99, 00:54:02, fatal , 1194 04/01/99, 01:13:21, zinat , 102 04/01/99,
00:02:25, alok , 4364 04/01/99, 01:04:29, agi , 700 04/01/99, 01:14:08,
sk_ak , 122 04/01/99, 01:07:14, scanbdce , 570 04/01/99, 01:06:24, sharif ,
632 04/01/99, 01:13:16, naimul , 244 04/01/99, 01:16:20, phuda , 225
04/01/99, 01:08:30, zeeshan , 747 04/01/99, 01:16:31, munirms , 287
04/01/99, 01:21:38, tonima , 24 04/01/99, 01:17:17, nancy , 335 04/01/99,
00:23:55, winner , 3543 04/01/99, 01:22:57, chqsd , 19 04/01/99, 01:23:16,
Utafbg , 7 04/01/99, 01:11:16, mkzaman , 727 04/01/99, 00:58:41, futh ,
1498 04/01/99, 01:23:52, cairndhk , 17 04/01/99, 01:24:31, waheed , 22
04/01/99, 01:18:11, inan , 442 04/01/99, 01:17:32, scanbdce , 519 04/01/99,
01:19:41, missouri , 390 04/01/99, 01:12:23, fahim , 832 04/01/99, 01:18:20,
pcnet , 499 04/01/99, 01:26:57, missouri , 1 04/01/99, 01:23:59, nancy ,
180 04/01/99, 01:26:13, tahmeed , 82 04/01/99, 01:30:06, Ulinmark , 5
04/01/99, 01:28:16, ashik , 168 04/01/99, 01:32:06, artekton , 82 04/01/99,
01:26:46, ratul , 459 04/01/99, 01:30:13, nancy , 370 04/01/99, 01:36:37,
ashik , 20 04/01/99, 00:36:06, zabir , 3669 04/01/99, 01:37:57, asad , 31
04/01/99, 01:39:03, Ucrwrc , 2 04/01/99, 00:18:26, sterling , 4861 04/01/99,
01:38:30, btsnet , 65 04/01/99, 01:28:05, rrahman , 928 04/01/99, 01:46:39,
Umccb , 6 04/01/99, 01:47:27, bokul , 13 04/01/99, 01:47:37, nowrin , 27
04/01/99, 01:02:44, rana , 2731 04/01/99, 01:48:14, ajmain , 2 04/01/99,
00:09:37, skarim , 5996 04/01/99, 01:27:43, inan , 1415 04/01/99, 01:46:52,
nancy , 317 04/01/99, 01:54:42, cairndhk , 15 04/01/99, 01:55:14, mishuk ,
175 04/01/99, 01:47:08, safeway , 685 04/01/99, 01:58:59, gds , 1 04/01/99,
01:08:11, taksing , 3391 04/01/99, 02:00:46, mishuk , 239 04/01/99,
02:00:52, inan , 343 04/01/99, 02:06:03, rumky , 118 04/01/99, 02:07:47,
sislams , 37 04/01/99, 01:39:54, ashik , 1716 04/01/99, 01:39:46, wasimm ,
1774 04/01/99, 02:13:19, rumky , 70 04/01/99, 02:21:16, joy19 , 49
04/01/99, 02:23:16, Utafbg , 7 04/01/99, 02:22:51, kmrahman , 42 04/01/99,
01:09:41, shibly , 4495 04/01/99, 02:25:29, cairndhk , 7 04/01/99, 02:16:13,
mishuk , 613 04/01/99, 02:25:43, rowly , 115 04/01/99, 02:25:07, prince1 ,
361 04/01/99, 01:52:22, baec , 2402 04/01/99, 02:33:24, Ulinmark , 11
04/01/99, 02:39:04, Ucrwrc , 2 04/01/99, 02:40:17, dorsch , 165 04/01/99,
02:46:35, Umccb , 8 04/01/99, 01:36:57, mhoq , 4240 04/01/99, 02:44:33,
magdy , 201 04/01/99, 01:08:51, ghaani , 5949 04/01/99, 02:31:18, square ,
1022 04/01/99, 01:41:43, rubel , 4074 04/01/99, 02:49:48, mhoq , 92
04/01/99, 02:53:59, bluebird , 24 04/01/99, 02:56:09, cairndhk , 6 04/01/99,
02:52:52, futh , 319 04/01/99, 02:58:59, gds , 1 04/01/99, 02:52:48, biton
, 1170 04/01/99, 03:03:37, zero , 720 04/01/99, 02:19:46, mzaman , 3377
04/01/99, 01:20:50, rahaman , 6913 04/01/99, 03:17:08, rahaman , 15
04/01/99, 03:23:18, Utafbg , 4 04/01/99, 03:23:50, sohel , 173 04/01/99,
03:26:47, cairndhk , 6 04/01/99, 03:30:38, Ulinmark , 2
the main purpose of the program is to produce various billing information of
an isp based on the logfile (above) provided. but when i try to redirect the
output to a particular file it gets stuck. ive put ### problem before the
line where the program seems to get stuck with somehing. below is the error
message i get after running perl with the -w option.
Invalid conversion in printf: "%)" at menu.pl line 192, <LOGFILE> chunk 44677.
Invalid conversion in printf: "%)" at menu.pl line 193, <LOGFILE> chunk 44677.
Once all three files have been made, please run the main script and select
the first option and enter the logfilename and then select the 2nd option and
select detail report and then enter 04/01/99 for the stopdate and select any
of the names of the logfile (or write ALL as username) and then select a name
(eg all.txt) as the outputfile name and then if things goes wrong (like it
has been with me) the program should get stuck.
please let me know if anyone has problem understanding my (not-so-elegent)
code. and id greatly appreciate if anyone could find out whats going wrong
here. thanks :) agniora
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Tue, 20 Apr 1999 19:13:25 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Problem with writing to file.
Message-Id: <lm1jf7.jv4.ln@magna.metronet.com>
scraig@my-dejanews.com wrote:
: It is also
: possible to turn off the output buffering.
How do you do that?
(enabling auto-flush does not "turn off" buffering)
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 21 Apr 1999 14:49:57 +1000
From: "David Bilbow" <dnb@emmerce.com.au>
Subject: programmer required
Message-Id: <7fjl8i$2uu$1@the-fly.zip.com.au>
Can someone please tell me which of the perl groups is the correct place to
find a perl programmer for long term employment located in Sydney ?
------------------------------
Date: Wed, 21 Apr 1999 05:35:57 GMT
From: "jim" <ji1@home.com>
Subject: Q: perl process won't go away
Message-Id: <1tdT2.279$FS3.342@news.rdc1.sfba.home.com>
We have some cgi scripts that is written in perl. The web server
is NT/IIS4. We are using perl.exe, not perl.dll. For some reason,
the perl.exe process won't go away after the execution. Eventually
the system will run hang. By the way, we are using activestate perl
5.007. We tried 5.008 and 5.015 build. Same problem.
Can someone shed some light on it? Thanks.
Jim
------------------------------
Date: 21 Apr 1999 05:17:36 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: scriptlet to add line breaks at even multiples?
Message-Id: <slrn7hqnon.ji.efflandt@efflandt.xnet.com>
On Tue, 20 Apr 1999 00:01:15 -0700, Counsel.Net <webmaster@counsel.net> wrote:
>Is there a simple solution for adding linebreaks on long fields? ...
>
>Thanks,
>
>Bob Reap
perldoc Text::Wrap
--
David Efflandt efflandt@xnet.com
http://www.xnet.com/~efflandt/
------------------------------
Date: 20 Apr 1999 23:24:59 -0600
From: Daniel Grisinger <dgris@moiraine.dimensional.com>
Subject: Re: Tool Reuse Considered Beneficial (was: New FAQ: How can I read in an entire file all at once?)
Message-Id: <m3k8v6czpw.fsf@moiraine.dimensional.com>
gorilla@elaine.drink.com (Alan Barclay) writes:
> However, I've noticed that this threat seems to have split into
> system() people - who want to use the existing programs whenever
> possible, and rewrite it people, who want to implement it themselves
> in perl. Haven't we forgotten a third option - modules.
Nope, I haven't forgotten at all about modules. Modules are the the
single best way of _not_ reinventing the wheel. Rather than calling
sort(1) to do some hairy sorts I'd far rather load an XS module tuned
to work with perl data types.
As an example of modular use, something I've been hacking on recently
starts out-
use strict;
use Archive::Tar;
use Compress::Zlib;
use Cpandb;
use Data::Dumper;
use DBI;
use Fcntl ':flock';
use File::Basename;
use Mail::Header;
use Net::FTP;
use Net::SMTP;
and goes on to accomplish an awful lot in less than a thousand lines
of code.
Coding the equivalent using the toolbox would have been an exercise
in frustration and futility. I'd have wasted days chasing down the
little quirks and subtle differences between my dev box and the
production box that the application is moving to. No thanks, I'll
take CPAN over the toolbox approach any day.
dgris
--
Daniel Grisinger dgris@moiraine.dimensional.com
perl -Mre=eval -e'$_=shift;;@[=split//;;$,=qq;\n;;;print
m;(.{$-}(?{$-++}));,q;;while$-<=@[;;' 'Just Another Perl Hacker'
------------------------------
Date: Wed, 21 Apr 1999 12:18:51 +0800
From: Toh Sek Lune <xuelun@ieee.org>
Subject: Web-Based Uploading of Files
Message-Id: <371D51AB.B28FBDAF@ieee.org>
Just want to find out is there any way in perl to pass the files
specified in the form fileupload object to be mailed as attachment to
the specified recipient?
ie:
<INPUT TYPE="file">
So, whatever is selected from the user's local dirrectory should be
passed to the form and then mailed as attachment to the recipient.
I tried using the normal way of parsing form input and then mailing
everything to a recipient which is myself for testing purposes. I only
get the pathname of the local file submitted.
Is the way to work around with this to do with perl, or has it got to do
with the HTML side. Maybe, I have to set the ENCTYPE in the FORM object
to something else??
Can someone please advise???
Thanks.
Sharon
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 5436
**************************************