[11527] in Perl-Users-Digest
Perl-Users Digest, Issue: 5127 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Mar 13 16:07:17 1999
Date: Sat, 13 Mar 99 13:00:18 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sat, 13 Mar 1999 Volume: 8 Number: 5127
Today's topics:
Re:
Re: 2d-array sort <asquith@macconnect.com>
Re: Array-Sort (Randal L. Schwartz)
can LWP handle tables yet? (Peter Bismuti)
Re: command-line CGI <pmoore@interaccess.com>
Re: Deleting the rest of the line... (Tad McClellan)
Re: Deleting the rest of the line... (Larry Rosler)
Re: flock / sysopen / open confusion (Bernie Cosell)
Help with perl ppp dialer <dbohling@earthlink.net>
Re: IDE for Perl (Jim Weisgram)
inv. cos <alber213@wxs.nl>
Log File's Contents Get Erased! tatabu@my-dejanews.com
Re: Log File's Contents Get Erased! (Clinton Pierce)
looking for samples: perl-curses-dbi-mysql <karl@proline.at>
Mail on WinNT - with no mail programm <jm@ptn.co.za>
Re: perl interpreter for windows 95 ? (Jim Weisgram)
ref returned by sub - how to use it? otis@my-dejanews.com
Re: ref returned by sub - how to use it? (Hans-Georg Rist)
Re: regexp gurus help! Parsing HTML <mct@moviefone.com>
Sending a Hotmail email <witless@my-dejanews.com>
Re: Sending a Hotmail email <synced@sdf.lonestar.org>
Re: suid problem (Marc Haber)
Re: Testing CGI scripts on a standalone (Larry Rosler)
Re: Testing for empty scalar ($ARGV[0]) (Tad McClellan)
Re: use diagnostics problem? (Ronald J Kimball)
Where can I find fakessi.pl? <GeoffW@wordsmith.demon.co.uk>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 13 Mar 1999 18:24:12 GMT
From: clintp@geeksalad.org (Clinton Pierce)
Subject: Re:
Message-Id: <36ebad15.136667035@news.roalok1.mi.home.com>
On Sat, 13 Mar 1999 01:10:26 -0500, rjk@linguist.dartmouth.edu (Ronald
J Kimball) wrote:
>Friday@Dragnet <in@after.noon> wrote:
>
>> In article <bingdo19-ya02408000R1203991142540001@news.alt.net>,
>> bingdo19@earthlink.net (Bob Langdon) wrote:
>>
>> > Special thanks to James Tolley <jamesht@idt.net> who e-mailed me to share:
>> >
>> > >> Glad to hear it's working for you. But if you want to improve it
>> > >> slightly, use unlink() instead of rename().
>> > >
>>
>> I mistakenly thought that you purposely would have had me delete 1500
>> files by changing "rename" to "unlink" but after corresponding with you by
>> e-mail, I sincerely believe it was an honest mistake that I overacted to,
>> and I sincerely appologize to you for the grief I may have caused you.
>
>Hrmm... Not sure what possible reason he would have had for thinking
>that unlink() would be an improvement over rename(), though...
On a Windows (95|98|NT) system, unlink() is ALWAYS an improvement over
rename().
--
"If you rush a Miracle Man, you get rotten miracles"
--Miracle Max, The Princess Bride
http://www.geeksalad.org
------------------------------
Date: Sat, 13 Mar 1999 11:18:40 -0600
From: "William H. Asquith" <asquith@macconnect.com>
Subject: Re: 2d-array sort
Message-Id: <7ce70l$14s1@enews1.newsguy.com>
First of all, Perl flattens arrays so @Data1 does not contain what you think
#!/usr/bin/perl -w
@Data1 = ( ( "1", "Hans", "Hamburg" ), ( "5", "Maria", "Mainz" ), ("2",
"Fred", "Frankfurt" ) );
print join(" | ",@Data1);
print "\n";
### 1 | Hans | Hamburg | 5 | Maria | Mainz | 2 | Fred | Frankfurt
Build it this way,
@Data1 = ( [ "1", "Hans", "Hamburg" ],
[ "5", "Maria", "Mainz" ],
[ "2", "Fred", "Frankfurt" ] );
# [ stuff ] are array references access "Hans" like this
print "$Data1[0]->[1] \n"; # -> is a dereferencing operator
print "$Data1[0][1]\n"; # does the same thing.
# Perl does not use multidimensional arrays like you expect, read a book if
# this is new.
print "@Data1 \n";
@index = sort { $Data1[$a][0] <=> $Data1[$b][0] } (0..$#Data1);
@Data1 = @Data1[@index];
print "@Data1 \n";
foreach (@Data1) {
print "$_ is really $_->[0], $_->[1], $_->[2]\n";
}
-wha
----------
In article <7cdni1$f4k$1@nnrp1.dejanews.com>, Stefan@Stark.net wrote:
> Hi all,
>
> sorry for this (easy?) question, but Perl is not my main subject so far.
>
> I have an array which looks like this: @Data1 = ( ( "1", "Hans", "Hamburg" ),
> ( "5", "Maria", "Mainz" ), ("2", "Fred", "Frankfurt" ) );
>
> Now I want to write a piece of source which sorts the array so that the result
> looks like this:
> @Data1 = ( ( "1", "Hans", "Hamburg" ), ("2", "Fred", "Frankfurt" ), ( "5",
> "Maria", "Mainz" ) );
>
> Thanks for any help.
>
> Stefan.
>
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 13 Mar 1999 07:10:01 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Array-Sort
Message-Id: <m1r9qttohi.fsf@halfdome.holdit.com>
>>>>> "Hans-Georg" == Hans-Georg Rist <hans-georg@rist.net> writes:
Hans-Georg> # my data:
Hans-Georg> @data = ( [ "1", "Hans", "Hamburg" ],
Hans-Georg> [ "5", "Maria", "Mainz" ],
Hans-Georg> [ "2", "Frank", "Frankfurt" ]
Hans-Georg> );
Hans-Georg> print "unsorted: ", map( { "@$_ " } @data ), "\n"; # unsorted
Hans-Georg> # use the Schwartzian Transform for sorting:
Hans-Georg> @data2 = map { $_->[0] }
Hans-Georg> sort { $a->[1] <=> $b->[1] } # numerically
Hans-Georg> map { [ $_, $_->[0] ] }
Hans-Georg> @data;
Hans-Georg> print "sorted: ", map( { "@$_ " } @data2 ), "\n";
The ST is major overkill here. Useful only when the function in
that final map stage is computationally expensive, which $_->[0] isn't :).
So, let's just reduce that back to:
@data2 = sort { $a->[0] <=> $b->[0] } @data;
And you'll save yourself some typing *and* some CPU time.
print "Just another Schwarzian Transform,"
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: 13 Mar 1999 16:44:34 GMT
From: bismuti@cs.fsu.edu (Peter Bismuti)
Subject: can LWP handle tables yet?
Message-Id: <7ce4li$c6u$1@news.fsu.edu>
Can the latest versions of LWP, HTML handle tables yet?? I have:
.
.
.
my $parser = HTML::LinkExtor->new(undef,$url);
$parser -> parse(get($url))->eof;
my @links = $parser->links;
foreach $linkarray (@links){
.
.
>From a cookbook script. It does not recognize links embeded within
tables, althoough I may not have the latest version.
Thanks
_____________________________________________________________________
| |
| Pete Bismuti |
| Department of Computer Science |
| Florida State University |
| bismuti@cs.fsu.edu (850) 644-0516 |
|_____________________________________________________________________|
------------------------------
Date: Sat, 13 Mar 1999 12:10:09 -0600
From: "Peter Moore" <pmoore@interaccess.com>
Subject: Re: command-line CGI
Message-Id: <7cea8q$fvs$1@remarQ.com>
Jonathan Stowe wrote in message <36e9436a.8675249@news.dircon.co.uk>...
>On Fri, 12 Mar 1999 11:04:32 -0500, Dave Heaney
><dave@peon.oit.umass.edu> wrote:
>
>>I'm writing some CGI programs for work, and I would like to be able to
>>test them from a command line, rather than having to test them on the
>>web. Is there any way to simulate the QUERY_STRING from the command
>>line? Thank you very much.
>>
>
>If you are using the module CGI.pm (as recommended by 9 out of 10 Perl
>breeders :) you can just run it - you will get something like:
>
>jns [pigment] $ perl cgt.pl
>(offline mode: enter name=value pairs on standard input)
>
>
>and then you just enter
>blah=woof
>thing=garabablablah
>^D
>
>/J\
I have done this amd is a very cute way to execute cmd line cgi env,
however the ^D did not work for me on my w32 machine only from the unix box.
Although the following worked
perl cgi.pl "name1=value name2=value2"
cant remember if i needed a "," a space or a "&" between args.
Pete
------------------------------
Date: Sat, 13 Mar 1999 06:52:16 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Deleting the rest of the line...
Message-Id: <ghjdc7.4ta.ln@magna.metronet.com>
David Falconer (webmaster@guestcities.com) wrote:
: In a text file I have, I want to delete all characters after a certain
: occurance of a word.
: So each time it comes across the word TRUCK it deletes all characters after
: that for the rest of the line.
s/TRUCK.*/TRUCK/;
or
s/\bTRUCK\b.*/TRUCK/; # leave FIRETRUCK alone
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sat, 13 Mar 1999 06:30:36 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Deleting the rest of the line...
Message-Id: <MPG.1154165ad4148da8989731@nntp.hpl.hp.com>
[Posted and a courtesy copy sent.]
In article <7cdahm$ukj$1@reader1.reader.news.ozemail.net> on Sat, 13 Mar
1999 18:46:53 +1100, David Falconer <webmaster@guestcities.com >says...
> In a text file I have, I want to delete all characters after a certain
> occurance of a word.
>
> So each time it comes across the word TRUCK it deletes all characters after
> that for the rest of the line.
>
> I checked out the Perl FAQ, but it didnt seem to have quite what I am after.
That is too basic to be a FAQ. You need to study 'perlre' until you get
it.
s/TRUCK.*/TRUCK/
or (if you don't like typing TRUCK twice or it may change):
s/(TRUCK).*/$1/
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personl/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Sat, 13 Mar 1999 17:17:56 GMT
From: bernie@fantasyfarm.com (Bernie Cosell)
Subject: Re: flock / sysopen / open confusion
Message-Id: <36ea9b7f.936133@news.supernews.com>
tadmc@metronet.com (Tad McClellan) wrote:
} JPAH-FLA (mymail@nospam.com) wrote:
} : Is there a
} : risk that after between OPEN and FLOCK that the file was changed?
}
}
} Yes. (but you must have really already known this, it says so
} in a comment in the Camel example that you cite...)
}
} That is why the seek() to be beginning is done after getting the lock.
Hmm... At least on Unix, perhaps the kernel has changed since I last messed
with it, but this doesn't jibe with my memory of how it works. Each open
file [on Unix] has a *private* file pointer, and so when you open the file,
your file pointer is at zero and stays there until you do a read or a seek.
Doing a seek back to the beginning if you've never done a read after
opening the file is, I was quite sure, a no-op [again, on Unix].
Now if you're *appending* to a file you need to seek to the *END* after you
get the lock: but for the same reason. When you open the file, your
(private!) file-position is set to hat is the end of the file at the time
you open it, but some other process may have appended to [or even
truncated!] the file before you get the lock, and so you need to reseek to
the end before you write. But I don't know of a case where you have to do
an extra seek to the *beginning*... could someone explain that for me?
/Bernie\
--
Bernie Cosell Fantasy Farm Fibers
bernie@fantasyfarm.com Pearisburg, VA
--> Too many people, too few sheep <--
------------------------------
Date: Sat, 13 Mar 1999 03:42:02 -0800
From: Daniel <dbohling@earthlink.net>
Subject: Help with perl ppp dialer
Message-Id: <36EA4F0A.D960F7B3@earthlink.net>
Hi all. I'm trying to make a script that will amongst other things
dial my isp.
I've cannabalized the included the shell script "ppp-on" that came with
my linux dist.
I'm having trouble sending the ppp daemon the output from the chat
program.
Right now i'm trying to use an anonymous subroutine that uses system
call to the chat program with all necessary parameters, and trying to
reference that while calling the ppp daemon.
Albeit that might be the problem, hah probably is , anyway if anyone
could take a look at my mess
and maybe suggest something I would be eternally grateful(if i live that
long ;-)).
Oh one more thing be careful if you fix it, it will loop forever --
almost.
#!/usr/bin/perl -w
use strict;
my $chat;
my $prid;
#step one dial
#step two verify connection
#get ip address
#open file and replace ip address
#three connect to ftp
#verify ftp
#put index.html
#open httpd.conf,add ip,close
#restart apache
#disconnect
#begin monitoring for pppd
#on disconnect launch new program, kill children and die, oh yeah use
backup on httpd.conf
#possible prompt for quit functionality or second script to kill entire
program
$chat = sub {
local @ARGV = qw(-v
TIMEOUT 3
ABORT '\nBUSY\r'
ABORT '\nNO ANSWER\r'
ABORT '\nRINGING\r\n\r\nRINGING\r'
'' \rAT
'OK-+++\c-OK' ATH0
TIMEOUT 30
OK ATDT4650053
CONNECT ''
ogin: dbohling
assword: tristan);
print STDOUT "Yeah we're trying to chat\n";
system 'chat', @ARGV || print STDOUT "First failure- here ya go: $!\n";
};
@ARGV = qw(debug lock modem crtscts /dev/modem 115200 asyncmap 20A0000
escape FF kdebug 0.0.0.0:0.0.0.0 noipdefault netmask 255.255.255.0
defaultroute connect $$chat);
system ('/usr/sbin/pppd', @ARGV) || print "Second failure-here ya go:
$!\n";
for ($prid = `ps`; $prid =~ /pppd/; $prid = `ps`) {
# print "yeah it's here\n";
# print $prid;
}
print "$$\n";
print "nope, it's gone\n";
die
------------------------------
Date: Sat, 13 Mar 1999 16:54:23 GMT
From: jweisgram@hotmail.com (Jim Weisgram)
Subject: Re: IDE for Perl
Message-Id: <370197cb.93390325@news.teleport.com>
swamichandra@my-dejanews.com wrote:
>Is there any IDE (preferably graphical other than X-Emacs) for Perl
>programming.
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
I believe a beta of such a tool was announced, although I don't know if it ever
matured. Search Deja News.
On the other hand, have you considered just using a text editor that allows you
to edit text and debug in the same session. I believe you can do this with
emacs.
--
Jim Weisgram
Oregon Department of Transportation
email: jweisgram@hotmail.com
All opinions expressed are mine and not my employers (but they ought to be)
------------------------------
Date: Sat, 13 Mar 1999 20:55:18 +0100
From: Dirk Alberti <alber213@wxs.nl>
Subject: inv. cos
Message-Id: <36EAC2A6.6605@wxs.nl>
sup, I am having a litte difficulty figurin something out. I know the
cosine function works like this:
... retval = sin (some_number); ...
Is it possible to figure out inverse cosines, is there some kind of
function for that I can use? I am working on a project for school
using angles, triangles, etc. I need to write a perl program to
make a whole bunch of calculations for me.
Even though it is possible using the sin function to use some smart
programming to compare Sin values of a list of angles to the Sin
result I get when dividing the length of the opposite and hypotenuse
of a triangle.
So far I haven't been able to find anything on inverse sines and
cosines, so any help/commant would be greatly apprecited.
Kind Regards, K.I.
------------------------------
Date: Sat, 13 Mar 1999 16:12:45 GMT
From: tatabu@my-dejanews.com
Subject: Log File's Contents Get Erased!
Message-Id: <7ce2pn$nqe$1@nnrp1.dejanews.com>
I have a CGI program that writes to a log file
every time one of several HTML pages is loaded. The
contents of this log file get erased from time to time.
Is this because several HTML files are calling th CGI program
simultaneously? How do we remedy this? Can we put
some kind of lock somewhere?
Thanks a million!
@@-->>> Soulis
friends@soulis.com
http://soulis.com
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Sat, 13 Mar 1999 18:20:43 GMT
From: clintp@geeksalad.org (Clinton Pierce)
Subject: Re: Log File's Contents Get Erased!
Message-Id: <36eaac4d.136467041@news.roalok1.mi.home.com>
On Sat, 13 Mar 1999 16:12:45 GMT, tatabu@my-dejanews.com wrote:
>I have a CGI program that writes to a log file
>every time one of several HTML pages is loaded. The
>contents of this log file get erased from time to time.
>Is this because several HTML files are calling th CGI program
>simultaneously? How do we remedy this? Can we put
>some kind of lock somewhere?
>Thanks a million!
Pick an OS.
Show us some code.
Read up on the differences between ">" and ">>"
--
"If you rush a Miracle Man, you get rotten miracles"
--Miracle Max, The Princess Bride
http://www.geeksalad.org
------------------------------
Date: Sat, 13 Mar 1999 18:47:58 +0100
From: "Karl" <karl@proline.at>
Subject: looking for samples: perl-curses-dbi-mysql
Message-Id: <7ce8bf$mns$1@fleetstreet.Austria.EU.net>
i recently looked around to get a few samples before i start to programm a
billing software running on text terminals based on perl with curses library
and with mysql as database (dbi).
if anyone knows some nice samples (e.g. some address management software or
something similiar) where i can see how to handle the terminal and the
database interface in a good way it would be really great.
many thanks,
karl@proline.at
------------------------------
Date: Sat, 13 Mar 1999 18:07:25 +0100
From: Juergen <jm@ptn.co.za>
Subject: Mail on WinNT - with no mail programm
Message-Id: <36EA9B4D.40F8DF62@ptn.co.za>
Hi!
I have a problem! The name of the perl program is ActivePerl. I have
installed many modules for Mail and so on, but I look for a method, that
can send emails on WinNT with no sendmail or an other mail program.
Can I do this ?
bye juergen
------------------------------
Date: Sat, 13 Mar 1999 16:57:26 GMT
From: jweisgram@hotmail.com (Jim Weisgram)
Subject: Re: perl interpreter for windows 95 ?
Message-Id: <3702988f.93586657@news.teleport.com>
"Marcel de Haan" <haantje@multiweb.nl> wrote:
>hello,
>
>does anyone know if a perl excuting engine exists for windows 95/nt ?
>i want to be able to test my perl scripts under this operating system.
>
>the scripts will meant to be running when they done under linux/apache
>server.
>
>hope someone can help me.
>
>regards,
>
>marcel
>
Assuming you mean that you want to write and test CGI scripts written in Perl,
I'd say you also want to obtain and install a web server that supports this and
runs in Win95. Such tools are also available. I think a search of Deja News will
find you some places to look.
--
Jim Weisgram
Oregon Department of Transportation
email: jweisgram@hotmail.com
All opinions expressed are mine and not my employers (but they ought to be)
------------------------------
Date: Sat, 13 Mar 1999 19:30:52 GMT
From: otis@my-dejanews.com
Subject: ref returned by sub - how to use it?
Message-Id: <7ceedc$17n$1@nnrp1.dejanews.com>
Hello,
I'm having trouble figuring out how to make use of a subroutine from which I
return a reference (to a scalar (string) variable).
e.g.
# sub that returns a ref
sub foo { $text = "long text here"; return \$text; }
# get the ref to that text
my $bar = &foo;
# pass the ref to another sub
&anotherSub($bar);
# prints out: long text here
sub anotherSub { my ($foo) = @_; print $$foo; }
# BUT, how do I go about doing this:
&anoherSub(&foo);
# so that I don't have to have that intermediate variable $bar there.
# I tried this (should work according to Adv. Perl Prog. book):
&anotherSub(\&foo());
but that didn't work.
Can somebody help me out with the syntax here?
I tried looking at perlref man page but still no go :(
Thanks,
Otis
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Sat, 13 Mar 1999 19:53:00 GMT
From: hans-georg@rist.net (Hans-Georg Rist)
Subject: Re: ref returned by sub - how to use it?
Message-Id: <36eac1ce.970972@news.uni-ulm.de>
otis@my-dejanews.com wrote:
>I'm having trouble figuring out how to make use of a subroutine from which I
>return a reference (to a scalar (string) variable).
>
>e.g.
>
># sub that returns a ref
>sub foo { $text = "long text here"; return \$text; }
>
># get the ref to that text
>my $bar = &foo;
>
># pass the ref to another sub
>&anotherSub($bar);
>
># prints out: long text here
>sub anotherSub { my ($foo) = @_; print $$foo; }
>
># BUT, how do I go about doing this:
>&anoherSub(&foo);
typing mistake? this should work:
&anotherSub(&foo);
># so that I don't have to have that intermediate variable $bar there.
HG
--
Hans-Georg Rist
hans-georg@rist.net
------------------------------
Date: Sat, 13 Mar 1999 17:19:23 GMT
From: Matt Trimboli <mct@moviefone.com>
Subject: Re: regexp gurus help! Parsing HTML
Message-Id: <7ce6mj$qs7$1@nnrp1.dejanews.com>
In article <36ea27da.2607399@news.skynet.be>,
bart.lateur@skynet.be (Bart Lateur) wrote:
> Bart Lateur wrote:
>
> >What is far worse is that it will gladly skip any HTML errors, or things
> >that are not exactly formed as in this one example.
That's OK. I'm expecting all HTML to be from a WYSIWYG editor (which doesn't
necessarily mean it's legal HTML, but good enough odds for me)
Wow. Thanks to all for 10 different ways to do something that I couldn't do
at all. I should have posted that I'm an acknowledged newbie; an Ops guy
trying to broaden the horizons a bit from shell scripting. I certainly see
that the Camel book isn't my only resource when I'm stuck with perl.
It occurred to me when I saw that there were parsers already written, that my
whole exercise may already have been completed by others. I'm trying to write
an HTML forms processing and routing application in perl using an SQL
back-end. So far I've had great success with the SQL and CGI side of things.
The HTML parsing part is to enable someone to create an HTML form with a
WYSIWYG editor and then feed it to the parser which will add it as a known
form type with all of its attributes to the database. It had been a lot of
fun until I got stuck here.
Does this application already exist as freeware?
I've seen Netscape's browser-based workflow but I was hoping to create
something that could learn from and post as freeware if it really works.
Thanks again.
Matt Trimboli
Technical Services Manager
mct@moviefone.com
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Sat, 13 Mar 1999 20:20:02 GMT
From: Witless <witless@my-dejanews.com>
Subject: Sending a Hotmail email
Message-Id: <7ceh9b$3hq$1@nnrp1.dejanews.com>
Can anyone enlighten me as to how I can send an email with a Hotmail account?
I've already figured out how to login and look and the Inbox.
Thanx
If nothing goes wrong on the first run, you must be using some sample
code...
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Sat, 13 Mar 1999 21:38:49 +0100
From: synced <synced@sdf.lonestar.org>
Subject: Re: Sending a Hotmail email
Message-Id: <36EACCD9.546E@sdf.lonestar.org>
hello, this is a perl newsgroup. go find a hotmail help file.
Witless wrote:
>
> Can anyone enlighten me as to how I can send an email with a Hotmail account?
> I've already figured out how to login and look and the Inbox.
>
> Thanx
>
> If nothing goes wrong on the first run, you must be using some sample
> code...
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Sat, 13 Mar 1999 19:43:49 GMT
From: Marc.Haber-usenet@gmx.de (Marc Haber)
Subject: Re: suid problem
Message-Id: <7cef5k$s6s$2@news.rz.uni-karlsruhe.de>
ron shenk <shenk@math.gatech.edu> wrote:
>Simple 3 line suid perl script on two machines A and B (sun
>workstations,
> solaris 2.5.1).
>
> #!/usr/local/bin/perl
> $ppphost = "jaguar";
> die "start-ppp must be run from $ppphost\n" if ( `hostname` ne
>"$ppphost\n" );
>
>On machine A runs without complaint; on machine B gives the following
>
> Insecure $ENV{PATH} while running setuid at /dev/fd/3 line 3.
>
> The PATH can even be just /usr/bin.
Please do a quick 'perldoc perlsec' and read what your system
displays.
Also, this seems to be in the FAQ.
Greetings
Marc
--
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber | " Questions are the | Mailadresse im Header
Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32 15
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31 29
------------------------------
Date: Sat, 13 Mar 1999 06:43:57 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Testing CGI scripts on a standalone
Message-Id: <MPG.11541987cc1f90a6989732@nntp.hpl.hp.com>
[Posted and a courtesy copy sent.]
In article <RSt6zBALNl62EwCc@goforit.demon.co.uk> on Sat, 13 Mar 1999
12:00:11 +0000, Doc <Doc@goforit.demon.co.uk >says...
> I am new to CGI scripting and am writing a script to produce web pages
> from a database - no problem there. But, I would like to be able to
> test the programme on my PC rather than have to use my provider's
> server! I know that I can run my programme via the command prompt but
> obviously that does not include the browser. How can I run it and see
> the results?
This came up yesterday too!
The only interface to your CGI program is via the environment variables
(and STDIN, if using the POST method). So, from the command line, use
the 'set' command to set the environment variables, then invoke your
program(me). You can encapsulate all that in a small batch file, to
avoid repeated typing errors.
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personl/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Sat, 13 Mar 1999 03:52:34 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Testing for empty scalar ($ARGV[0])
Message-Id: <i09dc7.4la.ln@magna.metronet.com>
Eric Weiss (eric.weiss@central.sun.com) wrote:
: I was curious if there is a way to test for an empty scalar? Reason
: being, I have a script that I would like to have bail out if it detects
: no argument specified with the perl script command. For example, in ksh
: I've used something like: if ($scalar = "") then exit 1 fi
if ($scalar eq '') {exit 1}
or
exit 1 if $scalar eq '';
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sat, 13 Mar 1999 15:39:08 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: use diagnostics problem?
Message-Id: <1dom398.1e9sise1kygex4N@bay1-464.quincy.ziplink.net>
Mick <horizon@internetexpress.com.au> wrote:
> I've confused you, Sorry!! :)
> My perl script runs fine, I just wanted to add diagnostics to check for
> warnings etc (And for future web-based scripts), I only compared Carp and
> diagnostics for there formats (To see if there was anything blatantly
> different in the diagnostics that may cause the premature end of script
> errors.) Why would use diagnostics cause premature end of script header?
You can't compare Carp and diagnostics for their formats. They do
completely different things.
What output do you get when you run your script from the command line?
--
_ / ' _ / - aka - rjk@linguist.dartmouth.edu
( /)//)//)(//)/( Ronald J Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Sat, 13 Mar 1999 20:10:09 +0000
From: Geoff Wilkins <GeoffW@wordsmith.demon.co.uk>
Subject: Where can I find fakessi.pl?
Message-Id: <wARcZLAhYs62Ew2m@wordsmith.demon.co.uk>
The source for the utility fakessi.pl is everywhere given as
http://sw.cse.bris.ac.uk/WebTools/fakessi.html
but I can't reach this. Does anyone know an alternative source?
____________________________________________________
Geoff Wilkins
34 Farnham Road, Handsworth, Birmingham B21 8EG, UK,
telephone: 0121-554 8264
email GeoffW@wordsmith.demon.co.uk
Web-site at http://www.wordsmith.demon.co.uk/
------------------------------
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 5127
**************************************