[16595] in Perl-Users-Digest
Perl-Users Digest, Issue: 4007 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 14 06:05:25 2000
Date: Mon, 14 Aug 2000 03:05:12 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <966247512-v9-i4007@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 14 Aug 2000 Volume: 9 Number: 4007
Today's topics:
Re: Auto running a script via email or by a specific ti <Peter.Dintelmann@dresdner-bank.com>
Re: CHOMP not working peterhi@my-deja.com
Re: Cross-platform shebang line CGI script shenanigans <glynFOOdwr@FSCKdeleteEmeD.co.uk>
Re: Cross-platform shebang line CGI script shenanigans <glynFOOdwr@FSCKdeleteEmeD.co.uk>
currency format eastking@my-deja.com
Re: date manipulation <iltzu@sci.invalid>
Re: date manipulation <bart.lateur@skynet.be>
Re: Get the Time <gisle@ActiveState.com>
Re: grep() optimisation (fvw)
Re: Help - weird cgi-perl problem praty@my-deja.com
How to change Popup frame's URL <psi@nospam.mikrolog.fi>
MS Word 2000 using Win32::OLE <dawsonc@teleport.com>
Re: Negativity in Newsgroup -- Solution (Eric Bohlman)
Re: Negativity in Newsgroup jthornton@my-deja.com
Re: Oracle connectivity using Perl <peter_gadsbyNOpeSPAM@hfcbank.co.uk.invalid>
Re: Pb with regular expression plz help ghorghor@my-deja.com
Re: Pb with regular expression plz help (Logan Shaw)
Re: Pb with regular expression plz help ghorghor@my-deja.com
Re: Perl on NT connect to SQL Server <Peter.Dintelmann@dresdner-bank.com>
Re: Perl/CGI suitable for this? <smcintyre@xrce.SPAM.xerox.com>
perlcc root@c237627-d.moline1.il.home.com
round eastking@my-deja.com
round eastking@my-deja.com
smarter way to do this (oneliner ?)? <jimmy.lantz@ostas.lu.se>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 14 Aug 2000 10:15:22 +0200
From: "Dr. Peter Dintelmann" <Peter.Dintelmann@dresdner-bank.com>
Subject: Re: Auto running a script via email or by a specific time??
Message-Id: <8n89oa$2lq1@intranews.dresdnerbank.de>
Hi,
Ryan schrieb in Nachricht ...
>Is it possible to run a PERL script in response to an email to a specific
>email address?? Is it possible to have a script run on a specific time
>every day??
both of your questions have nothing to do
with perl. The first one needs a bit of
programming done (write an app that checks
a mailbox and starts processes according
to incoming messages) the answer to your
second question is specific to your OS
(cron on *ix, at on nt...).
Peter Dintelmann
------------------------------
Date: Mon, 14 Aug 2000 08:32:53 GMT
From: peterhi@my-deja.com
Subject: Re: CHOMP not working
Message-Id: <8n8arl$glf$1@nnrp1.deja.com>
Remember that perl only chomps the \n off the end of a line, not any
embedded within the line! Thus...
$x = 'aaaaaa' . "\n" . 'zzzzzzz' . "\n";
print "$x";
print "Before the chomp\n";
chomp($x);
print "$x";
print "After the chomp\n";
Gives us...
aaaaaa
zzzzzzz
Before the chomp
aaaaaa
zzzzzzzAfter the chomp
Note that the 'After the chomp' is now appended onto our test line but
the break between the 'a's and the 'z's is intact. If it is an embeded
'\n' you are having to kill of you might want to try...
$x =~ s/\n//gi;
Thus...
$x = 'aaaaaa' . "\n" . 'zzzzzzz' . "\n";
print "$x";
print "Before the chomp\n";
$x =~ s/\n//gi;
print "$x";
print "After the chomp\n";
Gives...
aaaaaa
zzzzzzz
Before the chomp
aaaaaazzzzzzzAfter the chomp
What you probably wanted.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 14 Aug 2000 09:56:45 +0100
From: "Glyndwr" <glynFOOdwr@FSCKdeleteEmeD.co.uk>
Subject: Re: Cross-platform shebang line CGI script shenanigans - Windows and Linux with Apache
Message-Id: <quOl5.4359$pR4.86233@news6-win.server.ntlworld.com>
Jeff Zucker <jeff@vpservices.com> wrote in message
news:39946B57.70FF951E@vpservices.com...
> > #!/usr/bin/perl -Tw
>
> Mine too, (actually #!/usr/local/bin/perl -Tw) but that's because I
> installed Active Perl in the c:\usr\local directory, not because I
> depend on some M$ specific feature that M$ builds into their own
> webservers.
Aha! Sounds like that will solve the problem then, I'll try it later.
Thanks.
--
-=R=-
------------------------------
Date: Mon, 14 Aug 2000 09:58:25 +0100
From: "Glyndwr" <glynFOOdwr@FSCKdeleteEmeD.co.uk>
Subject: Re: Cross-platform shebang line CGI script shenanigans - Windows and Linux with Apache
Message-Id: <ZvOl5.4360$pR4.86282@news6-win.server.ntlworld.com>
Chris Barnabo <chris@spagnet.com> wrote in message
news:MPG.13fe7c74d5de4f909896a3@news.supernews.com...
> On Fri, 11 Aug 2000 20:45:53 GMT, Doran <doran@NOSPAMaltx.net> said ...
>
> > It shouldn't matter* what the shebang line reads on the Windows
> > machine, particularly if it's running as a CGI script on a web server,
> > since Windows handles all this through the registry.
> >
>
> Not necessarily ... Apache, for instance, will ignore the registry setting
> unless you include the directive "ScriptInterpreterSource registry" in
your
> configuration.
Aha!
> But then, this is actually more of a server issue than a Perl issue ...
> probably ought to move it over to the appropriate server group to get a
> definitive answer - Glyndwr said the _source_ environment was
> Debian/Apache/Perl/MySQL, but didn't actually specify what the target
> environment was on the Win2K system.
No, I didn't, which was dumb of me. It's MySQL/Apache on Win2k, too, so the
above trick will work it seems. I might also (more simply) install Perl in
C:/usr/bin on the Windows box, which also seems to work OK according to
another post.
Thanks!
--
-=R=-
------------------------------
Date: Mon, 14 Aug 2000 09:01:43 GMT
From: eastking@my-deja.com
Subject: currency format
Message-Id: <8n8chn$ho2$1@nnrp1.deja.com>
Hello ,every one here.
I have a currency number in a scalar, such as
my $a = 1234567;
I want to it be showed as 1,234,567
How can I do it.
Thank in advance
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 14 Aug 2000 07:52:29 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: date manipulation
Message-Id: <966239138.19483@itz.pp.sci.fi>
In article <MPG.13f8b0568a428cb398ac3f@nntp.hpl.hp.com>, Larry Rosler wrote:
>Instead of basing the time from time() and adding the offset (an
>integral number of days), use as the base:
>
> int(time() % 86400) * 86400 + 86400/2
>
>This gives the date at local noon, from which summer-time anomalies in
>the date are absent.
There seems to be a typo above. Surely you meant:
int(time() / 86400) * 86400 + 86400/2
And as far as I can tell the time returned is not _local_ noon, but
12:00 GMT, which sort of defeats the point of the exercise..
--
Ilmari Karonen - http://www.sci.fi/~iltzu/
"The screwdriver *is* the portable method." -- Abigail
Please ignore Godzilla and its pseudonyms - do not feed the troll.
------------------------------
Date: Mon, 14 Aug 2000 10:00:10 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: date manipulation
Message-Id: <fngfps06kt15c23jl057kpk3favaaaod07@4ax.com>
Ilmari Karonen wrote:
>There seems to be a typo above. Surely you meant:
>
> int(time() / 86400) * 86400 + 86400/2
>
>And as far as I can tell the time returned is not _local_ noon, but
>12:00 GMT, which sort of defeats the point of the exercise..
Sure. But you can comvert this time into a string using gmtime(), and
*pretend* that it's noon local time. Dates in GMT and localtime run
completely parallel.
--
Bart.
------------------------------
Date: 14 Aug 2000 09:38:33 +0200
From: Gisle Aas <gisle@ActiveState.com>
Subject: Re: Get the Time
Message-Id: <m3u2convgm.fsf@eik.g.aas.no>
abigail@foad.org (Abigail) writes:
> or even
>
> perl -le'print-localtime'
In this case the quotes don't actually do anything, so you might
want to write it as:
perl -leprint-localtime
> And just ignore the first character.
--
Gisle Aas
------------------------------
Date: Mon, 14 Aug 2000 07:09:52 GMT
From: fvw+usenet@var.cx (fvw)
Subject: Re: grep() optimisation
Message-Id: <966237011GNK.fvw@var.cx>
<x73dk8z5q0.fsf@home.sysarch.com> (uri@sysarch.com):
>what is the .* matching?
Could be anything. I'm looking for substrings of something which
is prefixed with a couple of fields seperated with :'s.
>is your match string at the end of the data?
nope, not necessarily.
>post some of the input and search strings.
All lines consist of n:nn:nn:nn:nn:url:string, with n being a decimal
digit, url being a http url without the http:// part, and string
being the title of a tv show (don't ask :-) ).
The strings in @b are substrings of the title.
>if you can isolate the match sting part somehow, you could just match
>the first part and then check if the second part is in a hash formed
>from @b (untested):
>
> @is_in_b{ @b } = () ;
>
> @c = grep /(?:[^:]*:){6}.*(MATCH_B)/i && $is_in_b{$1}, @a);
>
>put something in MATCH_B that will grab that string. you could deal with
>case insensitivity with lc or uc as needed.
As I'm only checking for substrings I don't think this method can
be used, but thanks to several other suggestions I think I've already
gotten it down to sane time anyway. Thanks for you suggestions!
--
Frank v Waveren
fvw@var.cx
ICQ# 10074100
------------------------------
Date: Mon, 14 Aug 2000 09:32:32 GMT
From: praty@my-deja.com
Subject: Re: Help - weird cgi-perl problem
Message-Id: <8n8ebg$iq7$1@nnrp1.deja.com>
Permission problem ? Even $cgi_data{'completepath'}
contains "/tmp/path" - essentially when I read the directory name from
form it doesnt work, but if I 'hardcode' the name in the script it
works.
Any clue ???
-Thanks,
Praty
In article <39942A26.DF8935DC@khio.no>,
Bulent Sarinc <Bulent@khio.no> wrote:
> It may be the permission-problem on that directory
> the first works because of /tmp is writeable for all users
>
> i had a similar problem
>
> praty@my-deja.com wrote:
>
> > Am trying to write a perl script to be able to upload files without
> > using ftp.
> >
> > I do a
> > &ReadParse(\%cgi_data,\%cgi_cfn,\%cgi_ct,\%cgi_sfn);
> >
> > to read all the data send by post.
> >
> > I want to read the destination from the form itself and I want to
> > rename the file in the perl script to the name entered in the form.
> >
> > Surprisingly
> > rename($cgi_sfn{'upfile'},"/tmp/testfile")
> > works
> > but the following doesnt
> > rename($cgi_sfn{'upfile'},$cgi_data{'completepath'})
> >
> > (Completepath is what I have the complete filename in the form, the
> > value of $cgi_data{'completepath'} is "/tmp/testfile" as verified by
> > printing)
> >
> > Whats going wrong ? I'm new to perl - is the language so weird ?
> >
> > Thanks in advance,
> > Praty
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 14 Aug 2000 08:20:39 GMT
From: "Pekka Siiskonen" <psi@nospam.mikrolog.fi>
Subject: How to change Popup frame's URL
Message-Id: <rZNl5.69$q57.9251@read2.inet.fi>
In Windows enviroment (w. Outlook) one can send a html page displayed on
browser by clicking the browser (explorer) window with "file/send/page by
e-mail...".
On the http://stein.cshl.org/WWW/CGI/examples/popup.cgi I wished to send the
page created by pressing the submit button of the form page, but as the URL
of the resulting page is the same as the fill in form's I keep sending the
original form.
Is there any other way to control the URL of the popup window/frame else
than with a hot link on the first page (instead of submit button)?
Pekka Siiskonen
------------------------------
Date: Mon, 14 Aug 2000 03:00:33 -0700
From: Dawson Cowals <dawsonc@teleport.com>
Subject: MS Word 2000 using Win32::OLE
Message-Id: <3997C341.AE74F99A@teleport.com>
Forgive my trespass to this sacred ground of UNIX heaven, but
unfortunately some of us have to actually work in this lame universe
where MS products are used on a daily basis. If I had my choice I'd be
on a nice Sun workstation...but NOOOOO I have to wade through the
afeared Blue Screen of Death and other less savory Windows tidbits. I
hope someone has already dealt with this issue as it's been driving me
nuts for a few days now. I'm having no problem launching an instance of
word, getting it to minimize, run in the background, open the files in
the tree I specify and go through the whole tree recursively. However,
I'm trying to then run a macro on each file I'm opening, and this macro
resides in a template file. Usually if I just launch Word from the
desktop this template (normal.dot) loads, containing my macro and I can
run it. However, when I'm launching Word from within my Perl script I
notice that the extra menu option associated with the template/macro
does not appear. For all I know I'm actually calling the macro code
correctly, but apparently the template is not getting attached. I tried
using the syntax they demonstrated for attaching a template to an open
document but it isn't working. Does anyone have a solution for this? I
suppose I can try and rewrite the VB code macro in Perl and avoid the
whole macro issue to begin with, but it would be nice to be able to use
other macros in this fashion.
Here's the gist of what I have going with a bunch of the guts on the
front and middle taken out, just trust me it's opening the files in the
tree correctly. :)
...
#instance of WORD
$Word = Win32::OLE->new('Word.Application', 'Quit');
...
#open word file
$doc = $Word->Documents->Open($file)
or die("Unable to open document ", Win32::OLE->LastError());
#This code works, and minimizes the word window when it opens the new
file
#so I know we've got some of the syntax correct, however we can't seem
#to get the template file to attach, or the macro to run
#
# $Word->{WindowState} = wdWindowStateMinimize;
#I've tried some of the following with no success thus far:
#attach template
$doc->AttachedTemplate->{Name} = "$macro_file";
$Word->Application->Run({
MacroName => 'LoopPage'
});
#then we close the document and move onto the next one to process
$doc->Save();
$doc->Close();
If anyone who has waded through the nonsense of invoking Word could drop
me a line with the correct syntax I would really appreciate it. I know
it's got to be some silly stickler of msbs that I'm just not pinning
down. Thanks! :) And say a prayer for those of us stuck in OS purgatory.
--Dawson Cowals
dawsonc@teleport.com
www.dawsoncowals.com
------------------------------
Date: 14 Aug 2000 07:26:00 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: Negativity in Newsgroup -- Solution
Message-Id: <8n86u8$iq9$2@nntp9.atl.mindspring.net>
Drew Simonis (care227@attglobal.net) wrote:
: "Randal L. Schwartz" wrote:
: >
: >
: > You just are expected to follow Usenet tradition:
: >
: > 1) read the group for a week or two before your first posting
:
: one
:
: >
: > 2) be sure to do your homework before you post
:
: two
:
: >
: > 3) recognize that this is not a help desk: it's volunteers that are doing
: > this for free because they *want* to help
:
: three
:
: >
: > If the "newbie" (a term which I would find offensive when I am one :)
: > just did these two things
: ^^^
:
: Methinks the Schwartz is growing weary.
I don't think Randal was expecting the Spanish Inquistion.
------------------------------
Date: Mon, 14 Aug 2000 07:08:28 GMT
From: jthornton@my-deja.com
Subject: Re: Negativity in Newsgroup
Message-Id: <8n85tb$ckm$1@nnrp1.deja.com>
You might look at the way questions (people) are handled in this
newsgroup (and other newsgroups) as a right-of-passage...
In article <39947037.905C0883@home.com>,
DM <drawbridge@home.com> wrote:
> Why are there so many negative remarks in this newsgroup?
>
> People come here with problems and people come here to help others.
> Some questions may not exactly fit the mold, so then don't answer it.
> Perl has so many uses that many of us peogrammers aren't sure where to
> turn to look for answers. Some users won't know if a question was
asked
> before because someone else asked it in the past. Get real, there are
> new Perl users everyday getting stuck on things you once got stuck on.
>
> No one knows EVERYTHING about this language. There is no Wise King
> here. So thank you to all of the helpful ones on this group, and to
all
> of the netative unhelpful ones...go look at yourself in the mirror
> because your ego is out of control.
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 14 Aug 2000 00:59:30 -0700
From: Peter_Gadsby <peter_gadsbyNOpeSPAM@hfcbank.co.uk.invalid>
Subject: Re: Oracle connectivity using Perl
Message-Id: <00f12582.8abd1d4b@usw-ex0102-014.remarq.com>
Erik ( and anyone else who can help ... ),
I've found the required switched to DBD now, and the code works
great when running in Korn Shell..... But when I run it via the
browser IE5, it just times out. I've cut & pasted the generated
HTML into the browser, and it seems to work fine, I've also
logged in as the HTTP user and the script runs correctly, so it
doesn't seem to be a permissions thing .... HELP!!!! Script
enclosed. Thanks
use strict;
use DBI;
my ( $sid );
my ( $schema );
my ( $osuser );
my ( $type );
my ( $time_held );
my ( $object );
$b=$ARGV[0];
print "<HTML>\n";
print "<HEAD><TITLE>Mips Locks</TITLE>\n";
print "<BODY>\n";
print '<LINK REL=STYLESHEET TYPE="text/css"';
print 'HREF="http://sssssss/mips_dev/style.css">';
print "<H1>Database Locks</H1>\n";
print "<TABLE border cellpadding=4>\n";
print "<SMALL>\n";
print "<TR>\n";
print "<TH>SID\n";
print "<TH>Schema\n";
print "<TH>OS_User\n";
print "<TH>Type\n";
print "<TH>Time_Held\n";
print "<TH>Object\n";
my $dbh = DBI ->connect ('dbi:Oracle:XXXX',
'xxxx',
'xxxx',
) || die "Database connection not made
$DBI::errstr";
my $a = "
select /*+RULE */ s.sid
,nvl(s.schemaname,
s.username) as schema
,s.osuser
as osuser
,l.type||' '||decode (l.lmode,0,'*REQ','HELD')
||decode
(l.block,1,'*',' ') as type
,replace (to_char (floor(ctime/(60*60)),'00')||':'||
to_char (mod(floor(ctime/60),60),'00')||':'||
to_char (mod
(ctime,60),'00'),' ') as time_held
,decode (l.type,'TX','Rollback Segment'
,'TM',obj.object_type||': '||obj.object_name
,'TT',obj.object_type||': '||obj.object_name
,'ST','Space Transaction Enqueue'
,'TS','Temporary Space Enqueue'
,'unrecognised') as object
from v\$lock\@$b l, dba_objects\@$b obj, v\$session\@$b s
where l.sid = s.sid
and decode (l.type, 'TM' ,l.id1, 'TT', l.id1, 0)=obj.object_id
(+)
and s.schemaname <> 'SYS'
order by 5
";
my $sth = $dbh->prepare( $a );
$sth->execute();
$sth->bind_columns
(undef,\$sid,\$schema,\$osuser,\$type,\$time_held,\$object);
while ( $sth->fetch() ) {
print "<TR>\n";
print "<TD>$sid</TD>\n";
print "<TD>$schema</TD>\n";
print "<TD>$osuser</TD>\n";
print "<TD>$type</TD>\n";
print "<TD>$time_held</TD>\n";
print "<TD>object</TD>\n";
print "</TR>\n";
}
$sth->finish();
$dbh ->disconnect();
print "</BODY>\n";
print "</HTML>\n";
-----------------------------------------------------------
Got questions? Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com
------------------------------
Date: Mon, 14 Aug 2000 07:42:54 GMT
From: ghorghor@my-deja.com
Subject: Re: Pb with regular expression plz help
Message-Id: <8n87tu$erf$1@nnrp1.deja.com>
up
i need help
i have test several things but nothing work
In article <8n84us$bug$1@nnrp1.deja.com>,
ghorghor@my-deja.com wrote:
> Hello
>
> I'm using this expression for finding and deletin an adresse store in
> $adresse var
> like: $adresse="http://www.nowhere.com/folders/files.zip"
>
> this is the expression :
> @fichier[10]=~s/((<br>)?)<a(\s?)href=("?)$adresse([^<]+)<\/a>//i;
>
> but sometimes
> i have adresse like this: http://www.nowhere.com/folders/files[1].zip
>
> and with theses adresses that doesn't work
> because the [ car are interpreted by the expression
>
> plz could someone help me
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 14 Aug 2000 02:53:46 -0500
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: Pb with regular expression plz help
Message-Id: <8n88ia$1l4$1@provolone.cs.utexas.edu>
In article <8n84us$bug$1@nnrp1.deja.com>, <ghorghor@my-deja.com> wrote:
>this is the expression :
> @fichier[10]=~s/((<br>)?)<a(\s?)href=("?)$adresse([^<]+)<\/a>//i;
>
>but sometimes
>i have adresse like this: http://www.nowhere.com/folders/files[1].zip
>
>and with theses adresses that doesn't work
>because the [ car are interpreted by the expression
This is in the FAQ. Try typing "perldoc -q quote".
- Logan
------------------------------
Date: Mon, 14 Aug 2000 08:19:58 GMT
From: ghorghor@my-deja.com
Subject: Re: Pb with regular expression plz help
Message-Id: <8n8a3b$g7l$1@nnrp1.deja.com>
thx a lot
In article <8n88ia$1l4$1@provolone.cs.utexas.edu>,
logan@cs.utexas.edu (Logan Shaw) wrote:
> In article <8n84us$bug$1@nnrp1.deja.com>, <ghorghor@my-deja.com>
wrote:
> >this is the expression :
> > @fichier[10]=~s/((<br>)?)<a(\s?)href=("?)$adresse([^<]+)<\/a>//i;
> >
> >but sometimes
> >i have adresse like this: http://www.nowhere.com/folders/files[1].zip
> >
> >and with theses adresses that doesn't work
> >because the [ car are interpreted by the expression
>
> This is in the FAQ. Try typing "perldoc -q quote".
>
> - Logan
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 14 Aug 2000 11:05:41 +0200
From: "Dr. Peter Dintelmann" <Peter.Dintelmann@dresdner-bank.com>
Subject: Re: Perl on NT connect to SQL Server
Message-Id: <8n8cml$2lr1@intranews.dresdnerbank.de>
Hi,
lancepr@my-deja.com schrieb in Nachricht <8n1id4$17i$1@nnrp1.deja.com>...
>I am running active perl and need to connect to
>my SQL server using filedsn.
>The filedsn seems to be my hang up.
>Are their any good books or websites that will
>help me connect to SQL server?
have a look at the DBI page
http://www.symbolstone.org/technology/perl/DBI/index.html
or at the Win32::ODBC documentation
http://www.roth.net/perl/odbc/
Best regards,
Peter Dintelmann
------------------------------
Date: Fri, 11 Aug 2000 18:00:37 +0100
From: "Dr Stuart McIntyre" <smcintyre@xrce.SPAM.xerox.com>
Subject: Re: Perl/CGI suitable for this?
Message-Id: <966241984.9657.0.nnrp-08.d4f05889@news.demon.co.uk>
"Stuart Moore" <stumo@bigfoot.com> wrote in message
news:8n0jjd$na4$1@supernews.com...
> www.cpan.org
Thanks, loads of useful stuff there...
> I picked up Perl pretty quickly from a background in Java - it's probably
> easier to go that way round, as perl is far more forgiving than Java is,
and
> the looping constructs etc. are very similar. The one thing that you would
> probably have no background on is regular expressions - I'm not sure
whether
> they'd be relevant in this case, probably not unless you want to use them
to
> check the url that the script has been sent is valid.
Well, I was originally a borderline Unix person, but Perl still looks pretty
scary sometimes :)
Thanks,
Stuart
------------------------------
Date: Mon, 14 Aug 2000 08:57:15 GMT
From: root@c237627-d.moline1.il.home.com
Subject: perlcc
Message-Id: <LvOl5.158579$dF.4740817@news1.rdc1.il.home.com>
aloha,
is there any working opensource perlcompiler yet?
or is perl2exe it?
mark.
------------------------------
Date: Mon, 14 Aug 2000 09:31:09 GMT
From: eastking@my-deja.com
Subject: round
Message-Id: <8n8e8u$ipr$1@nnrp1.deja.com>
hello every one here.
I'd rather use a function such as round(). It is said in perlfaq that I
can use sprintf to do this. following is my test script.
my $a = 1.25;
my $b = 1.250;
printf("%1.1f",$a);
print "\n";
printf("%1.1f",$b);
it showed following under windows2000/Activeperl
1.3
1.3
but it showed following under pc-solaris
1.2
1.3
and following under linux
1.2
1.2
I'm really confused.
please help me. Thank in advance
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 14 Aug 2000 09:35:31 GMT
From: eastking@my-deja.com
Subject: round
Message-Id: <8n8eh3$irv$1@nnrp1.deja.com>
hello every one here.
I'd rather use a function such as round(). It is said in perlfaq that I
can use sprintf to do this. following is my test script.
my $a = 1.25;
my $b = 1.250;
printf("%1.1f",$a);
print "\n";
printf("%1.1f",$b);
it showed following under windows2000/Activeperl
1.3
1.3
but it showed following under pc-solaris
1.2
1.3
and following under linux
1.2
1.2
I'm really confused.
please help me. Thank in advance
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 14 Aug 2000 10:18:57 +0200
From: Jimmy Lantz <jimmy.lantz@ostas.lu.se>
Subject: smarter way to do this (oneliner ?)?
Message-Id: <3997AB70.410D9813@ostas.lu.se>
Hi,
Is it possible to call it the below code in a one-liner ?
######## Code ########
&KursModul::search_file("${databasdir}kurslista.data", kurskod, $kurskod);
$kursbeskrivning = $KursModul::Record{beskrivning};
####### Pseudo code ######
The above calls a sub which search a file and creates a hash (%Record)
of the result, then assigns the value of one item in the hash to a variable.
Please come with suggestions
// Jimmy L.
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
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.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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.
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 V9 Issue 4007
**************************************