[11698] in Perl-Users-Digest
Perl-Users Digest, Issue: 5298 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Apr 5 04:06:12 1999
Date: Mon, 5 Apr 99 01:00:20 -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 Mon, 5 Apr 1999 Volume: 8 Number: 5298
Today's topics:
backgroup job with "at" command userjeff@my-dejanews.com
Re: check to see if directory exists <bill@fccj.org>
Re: Counting spaces in a variable agniora@usa.net
Re: Counting spaces in a variable (Larry Rosler)
Re: Does anyone know whats wrong with my script? <aperrin@mcmahon.qal.berkeley.edu>
Re: Does anyone know whats wrong with my script? <aperrin@mcmahon.qal.berkeley.edu>
Re: Does anyone know whats wrong with my script? (Sam Holden)
Re: Does anyone know whats wrong with my script? smnayeem@my-dejanews.com
Re: Help-Perl Usergroups <bill@fccj.org>
Re: How do i use the / character in split command. (Tad McClellan)
Re: How to set the Printer fonts using perl? <bill@fccj.org>
Re: is there any ceiling function in perl? <bill@fccj.org>
Re: is there any ceiling function in perl? <bill@fccj.org>
Re: Modifying a File <bill@fccj.org>
Re: Perl Question for generating HTML (Tad McClellan)
Re: Perl Question for generating HTML <ebohlman@netcom.com>
Re: Perl/CGI with Frontpage PWS <bill@fccj.org>
Re: Reading local files <bill@fccj.org>
Re: Scope of variables <zenin@bawdycaste.org>
Re: Sending a email using PERL <bill@fccj.org>
Re: Silicon Valley Perl Mongers? (David H. Adler)
Re: Silicon Valley Perl Mongers? <bill@fccj.org>
Re: SQL help please (newbie question) <bill@fccj.org>
Re: The ultimate challenge <bill@fccj.org>
Re: using perl CGI to automatically post data to an HTM <bill@fccj.org>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 05 Apr 1999 07:08:48 GMT
From: userjeff@my-dejanews.com
Subject: backgroup job with "at" command
Message-Id: <7e9nhs$3m5$1@nnrp1.dejanews.com>
I use the command "at" in FreeBSD and have the following problem that I
do not have in UNIX(Digital 4.0U). I have one a script written in perl5,
say, test.pl It works fine when I type "test.pl" in FreeBSD.But it does not
work when I type
at -f test.pl now + 1 minute
(In UNIX(Digital), it is fine with the command: at now + 1 minute test.pl )
I think the main problem is in FreeBSD the default env. for at is /bin/sh
But I do not know how to solve this problem.
Summary: How to execute a perl script using the command "at" in FreeBSD?
Jeff
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Sun, 04 Apr 1999 23:37:00 -0400
From: "Bill Jones" <bill@fccj.org>
Subject: Re: check to see if directory exists
Message-Id: <37082ff7.0@usenet.fccj.cc.fl.us>
> "Stephen M. Shelly" <stephen@chiso.com> writes:
>
>> if (!(-d "x:\\home\\$Name"))
>> print ("Need to create homedir for $Name");
>>
>> this is not working though.....
>
print ("Need to create homedir for $Name")
if (!(-d "x:\\home\\$Name"));
???
-Sneex- :]
________________________________________________________________________
Bill Jones | FCCJ Webmaster | http://www.fccj.org/cgi/mail?webmaster
FCCJ | 501 W State St | Jacksonville, FL 32202 | 1 (904) 632-3089
Jacksonville Perl Mongers
http://jacksonville.pm.org
jax@jacksonville.pm.org
------------------------------
Date: Mon, 05 Apr 1999 06:02:48 GMT
From: agniora@usa.net
Subject: Re: Counting spaces in a variable
Message-Id: <7e9jm4$je$1@nnrp1.dejanews.com>
In article <RKQN2.137$xI5.5165@typhoon.nycap.rr.com>,
"IndexFinger.com" <indexfinger@usa.net> wrote:
> What is the function to count the number of spaces in a variable?
>
> Example: "This is an example variable"
>
> In the example, there are 4 spaces.
>
> --
> ==================================================
> BigTalker - http://www.bigtalker.com
> Bulletin board software - faster than the UBB
>
>
theoratically this should work :
$_ = 'This is a text';
$Value = tr/ / /;
print "$value";
when i debug it and test the value of $Value i get 3, but i cant seem to get
it to be displayed with the print command that follows. does anyone know
whats wrong here? and is there any way to shorten this? agniora
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 5 Apr 1999 00:31:37 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Counting spaces in a variable
Message-Id: <MPG.117206ac795620d198982f@nntp.hpl.hp.com>
[Posted and a courtesy copy sent.]
In article <7e9jm4$je$1@nnrp1.dejanews.com> on Mon, 05 Apr 1999 06:02:48
GMT, agniora@usa.net <agniora@usa.net >says...
...
> $_ = 'This is a text';
> $Value = tr/ / /;
> print "$value";
>
> when i debug it and test the value of $Value i get 3, but i cant seem to get
> it to be displayed with the print command that follows. does anyone know
> whats wrong here? and is there any way to shorten this? agniora
One thing is seriously wrong, which would have been obvious if you had
run this snippet with the '-w' flag and 'use strict;'. $Value and
$value are not the same variable.
As for shortening it, you can shorten the tr expression as shown below,
and you *should* leave out the quotes around the simple variable $value.
But this is even shorter:
$_ = 'This is a text';
print tr/ //;
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Sun, 04 Apr 1999 22:42:23 -0700
From: Andrew Perrin <aperrin@mcmahon.qal.berkeley.edu>
To: Bill Moseley <moseley@best.com>
Subject: Re: Does anyone know whats wrong with my script?
Message-Id: <37084D3F.69921AC6@mcmahon.qal.berkeley.edu>
Err, I believe you're wrong here:
~/test.pl:
#!/usr/local/bin/perl
sub print_input {
my($stuff) = @_;
print "$stuff\n";
}
&print_input('Foo-bar.');
aperrin@davis:~>perl test.pl
Foo-bar.
I agree that this seems counterintuitive, and I'm not sure I have a good
explanation for it; my experience is that there's something like an
implied shift() going on. But I'm quite sure it works fine....
Cheers,
Andy
Bill Moseley wrote:
> In article <7e9fbr$t8h$1@nnrp1.dejanews.com>, agniora@usa.net says...
> > I wrote a function to find the weekday of a given date.
>
> I'd use timelocal and localtime to do that work.
>
> > #my $Onlydate = @_;
>
> Eh, I don't think you want the count of the number of elements in @_?
>
> --
> Bill Moseley mailto:moseley@best.com
--
-------------------------------------------------------------
Andrew J. Perrin - NT/Unix/Access Consulting - (650)938-4740
aperrin@mcmahon.qal.berkeley.edu (Remove the Junk Mail King)
http://www.geocities.com/SiliconValley/Grid/7544/
-------------------------------------------------------------
------------------------------
Date: Sun, 04 Apr 1999 22:53:05 -0700
From: Andrew Perrin <aperrin@mcmahon.qal.berkeley.edu>
To: agniora@usa.net
Subject: Re: Does anyone know whats wrong with my script?
Message-Id: <37084FC0.65AFF0A7@mcmahon.qal.berkeley.edu>
Oops, forgot to note what the actual problem was: a little hint... (much of) perl
is cASE sENSITIVE.
Sub FindDate {
...
}
doesn't work but
sub FindDate {
...
}
works fine.
ap
agniora@usa.net wrote:
> I wrote a function to find the weekday of a given date.
> but strangely, if i run it as a program then it works, but when i make it a
> subroutine it gives errors.
> heres the script :
> #print &FindDate('04/04/99');
>
> #Sub FindDate {
> #my $Onlydate = @_;
> $Onlydate = "04/04/99";
> $Onlydate =~ s/\// /g;
> @Adate = split(/ /,$Onlydate);
> @Days = ('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
> %Special =
> (
> "Jan" => 0,
> "Feb" => 3,
> "Mar" => 3,
> "Apr" => 6,
> "May" => 1,
> "Jun" => 4,
> "Jul" => 6,
> "Aug" => 2,
> "Sep" => 5,
> "Oct" => 0,
> "Nov" => 3,
> "Dec" => 5,
> );
> @Months =
> ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
>
> print $Months[$Adate[1]-1];
> print $Days[(5+$Special{$Months[$Adate[1]-1]} + $Adate[0]-1) % 7];
> #return $Days[(5+$Special{$Months[$Adate[1]-1]} + $Adate[0]-1) % 7];
> #}
>
> try running this program and it will give the day of any date (at present only
> for the year 99).
> then try uncommenting the commented lines and running it, it gives various
> errors.
> does anyone know where i went wrong?
> ill appreciate any help.
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
--
-------------------------------------------------------------
Andrew J. Perrin - NT/Unix/Access Consulting - (650)938-4740
aperrin@mcmahon.qal.berkeley.edu (Remove the Junk Mail King)
http://www.geocities.com/SiliconValley/Grid/7544/
-------------------------------------------------------------
------------------------------
Date: 5 Apr 1999 06:05:39 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Does anyone know whats wrong with my script?
Message-Id: <slrn7ggklj.15b.sholden@pgrad.cs.usyd.edu.au>
Andrew Perrin <aperrin@mcmahon.qal.berkeley.edu> wrote:
>Err, I believe you're wrong here:
>
>~/test.pl:
>#!/usr/local/bin/perl
>sub print_input {
> my($stuff) = @_;
> print "$stuff\n";
>}
>
>&print_input('Foo-bar.');
>
>aperrin@davis:~>perl test.pl
>Foo-bar.
>
>I agree that this seems counterintuitive, and I'm not sure I have a good
>explanation for it; my experience is that there's something like an
>implied shift() going on. But I'm quite sure it works fine....
I don't understand what you mean...
@_ becomes ('Foo-bar.') when you call the sub...
Then you say ($stuff) = ('Foo-bar.') so $stuff becomes 'Foo-bar.'
as you would expect.
There is no shift happening...
Without the ()s then as the last poster said it will assign the number of
elements in @_ to the scalar (since that was an array is in a scalar
context).
>Bill Moseley wrote:
>
>> In article <7e9fbr$t8h$1@nnrp1.dejanews.com>, agniora@usa.net says...
>>
>> > #my $Onlydate = @_;
>>
>> Eh, I don't think you want the count of the number of elements in @_?
--
Sam
Every human culture has good and bad points. Every computer program has
Eveone more bug. Even Perl.
--Larry Wall
------------------------------
Date: Mon, 05 Apr 1999 06:57:15 GMT
From: smnayeem@my-dejanews.com
Subject: Re: Does anyone know whats wrong with my script?
Message-Id: <7e9ms8$37e$1@nnrp1.dejanews.com>
In article <MPG.1171e779cb7962cc989709@206.184.139.132>,
moseley@best.com (Bill Moseley) wrote:
> In article <7e9fbr$t8h$1@nnrp1.dejanews.com>, agniora@usa.net says...
> > I wrote a function to find the weekday of a given date.
>
> I'd use timelocal and localtime to do that work.
>
> > #my $Onlydate = @_;
>
> Eh, I don't think you want the count of the number of elements in @_?
>
> --
> Bill Moseley mailto:moseley@best.com
>
i tried it again replacing @_ with @_[0] but it says syntax error on the next
line. i cant figure out any "syntax errors" on the later portion.
and i also tried to get myself to understand the localtime and the timelocal
very hard, i looked at the FAQ, the Camel etc but i cant seem to be able to
figure out how my particular problem can be solved, i know its possible with
those but the examples and explanations they have are inadequate. can someone
show me how it (finding a day from a date) can be done with the help of
localtime and timelocal with some examples. thanks agniora
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 05 Apr 1999 00:45:37 -0400
From: "Bill Jones" <bill@fccj.org>
Subject: Re: Help-Perl Usergroups
Message-Id: <37084013.0@usenet.fccj.cc.fl.us>
In article <7e55hu$b17$1@charlotte.aracnet.net>, tonyd@aracnet.net (Tony )
wrote:
> Can someone direct me to a group where I can post some of my job openings for
> Perl Web Masters. The openings I have currently are in Toronto Canada. I have
> heard that there is a Usergroup called Perl Mongerers (not sure of the
> spelling) Help in these two areas would really be appreciated.
>
> Thank You!
See http://www.pm.org
-Sneex- :]
________________________________________________________________________
Bill Jones | FCCJ Webmaster | http://www.fccj.org/cgi/mail?webmaster
FCCJ | 501 W State St | Jacksonville, FL 32202 | 1 (904) 632-3089
Jacksonville Perl Mongers
http://jacksonville.pm.org
jax@jacksonville.pm.org
------------------------------
Date: Sun, 4 Apr 1999 19:50:18 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: How do i use the / character in split command.
Message-Id: <qrt8e7.avp.ln@magna.metronet.com>
agniora@usa.net wrote:
: $t = '21/03/99';
: @t=split (/\//,$t);
: this doesnt work.
Yes it does.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 05 Apr 1999 00:33:48 -0400
From: "Bill Jones" <bill@fccj.org>
Subject: Re: How to set the Printer fonts using perl?
Message-Id: <37083d4f.0@usenet.fccj.cc.fl.us>
In article <7e44nj$ed8$1@bgtnsc02.worldnet.att.net>, "Jason Simms"
<ffchopin@worldnet.att.net> wrote:
>> Hi fellas, Is there any ways to change the default text font when writing
>> plain text files in perl? cuz usually the font that it prints gets really
> big
>> and then i cant use perl to create nice-looking reports or invoices.
> thanks
>> in advance. Nayeem Programmer, Agni Systems Ltd.
>
> Unless I'm really missing something, plain text files means just that -
> plain, ascii text. Without more information on exactly what you're trying
> to do (i.e., you mention printing in your header but use an ambiguous
> reference to printing in the body), I can't be of much help. Do you want to
> actually print the document to a printer, or just are wondering if you can
> change the font that the text file gets output in? If it is the later, then
> no, I don't think so, as Perl will write it in plain ASCII text. And what
> do you mean by "the font gets really big..."? As in, going from 9 pt. to 12
> pt. to 14 pt., etc.? Please be more specific, and please stop using CUZ...
>
> Jason Simms
>
OK, OK, OK :] Here's one -
There was this guy who wanted to know how to change the size of
a text font before downloading - making it smaller -
that way the download would take less time, you know?
-Sneex- :]
________________________________________________________________________
Bill Jones | FCCJ Webmaster | http://www.fccj.org/cgi/mail?webmaster
FCCJ | 501 W State St | Jacksonville, FL 32202 | 1 (904) 632-3089
Jacksonville Perl Mongers
http://jacksonville.pm.org
jax@jacksonville.pm.org
------------------------------
Date: Mon, 05 Apr 1999 00:26:46 -0400
From: "Bill Jones" <bill@fccj.org>
Subject: Re: is there any ceiling function in perl?
Message-Id: <37083ba7.0@usenet.fccj.cc.fl.us>
In article <7e4jbi$499$1@nnrp1.dejanews.com>, smnayeem@my-dejanews.com
wrote:
> In article <7e4b6v$t41$1@nnrp1.dejanews.com>,
> agniora@usa.net wrote:
>> does anyone know if theres any ceiling function in perl that would round up
>> decimal numbers to the integer.
>>
>> -----------== Posted via Deja News, The Discussion Network ==----------
>> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>>
> By the way, i already checked the faq and cpan, i will require the posix.pm
> module, but i cant seem to find the winNT version of posix.pm.
Did you install the GS Perl port???
You can, see http://reference.perl.com/query.cgi?section=windows
as a good starting place.
HTH,
-Sneex- :]
________________________________________________________________________
Bill Jones | FCCJ Webmaster | http://www.fccj.org/cgi/mail?webmaster
FCCJ | 501 W State St | Jacksonville, FL 32202 | 1 (904) 632-3089
Jacksonville Perl Mongers
http://jacksonville.pm.org
jax@jacksonville.pm.org
------------------------------
Date: Mon, 05 Apr 1999 00:27:56 -0400
From: "Bill Jones" <bill@fccj.org>
Subject: Re: is there any ceiling function in perl?
Message-Id: <37083bec.0@usenet.fccj.cc.fl.us>
In article <m34smxychf.fsf@joshua.panix.com>, Jonathan Feinberg
<jdf@pobox.com> wrote:
> smnayeem@my-dejanews.com writes:
>
>> By the way, i already checked the faq and cpan, i will require the
>> posix.pm module, but i cant seem to find the winNT version of
>> posix.pm.
>
> There is no "posix.pm". You must
>
> use POSIX qw/ ceil floor /;
>
> Capitalization counts.
>
> --
> Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
> http://pobox.com/~jdf
Oops!
Ignore my last ranting about the GS Port.
HTH,
-Sneex- :]
________________________________________________________________________
Bill Jones | FCCJ Webmaster | http://www.fccj.org/cgi/mail?webmaster
FCCJ | 501 W State St | Jacksonville, FL 32202 | 1 (904) 632-3089
Jacksonville Perl Mongers
http://jacksonville.pm.org
jax@jacksonville.pm.org
------------------------------
Date: Mon, 05 Apr 1999 00:24:12 -0400
From: "Bill Jones" <bill@fccj.org>
Subject: Re: Modifying a File
Message-Id: <37083b0c.0@usenet.fccj.cc.fl.us>
In article <37059819.B9075A33@asiamake.com>, Alex <account@asiamake.com>
wrote:
> Please help,
> The script below(actually, I learn from Robert Perl Tutorial ) has run
> and test perfectly in my own computer (win 95). However, when I upload
> the scripts to server, it don't work. But no error appear, just don't
> work !
> The scripts is:
>
> @ARGV="c:/scripts/out.txt";
> $^I=".bk";
> while (<>) {
> tr/A-Z/a-z/;
> print;
> }
>
> No back-up file(out.txt.bk) is created. Also no chnage of the out.txt
> file.
> Please help.
>
> Thank you
> Alex
>
Can I go out on a limb here and ask What Kind Of Server you
Uploaded them to? Maybe an FTP server?
If you are speaking of a Windows-centric WWW server, please
see http://reference.perl.com/query.cgi?section=windows
as a good starting place.
Just wondering,
-Sneex- :]
________________________________________________________________________
Bill Jones | FCCJ Webmaster | http://www.fccj.org/cgi/mail?webmaster
FCCJ | 501 W State St | Jacksonville, FL 32202 | 1 (904) 632-3089
Jacksonville Perl Mongers
http://jacksonville.pm.org
jax@jacksonville.pm.org
------------------------------
Date: Sun, 4 Apr 1999 19:40:39 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Perl Question for generating HTML
Message-Id: <n9t8e7.avp.ln@magna.metronet.com>
trimbleman@hotmail.com wrote:
: In article <1rs4e7.61h.ln@magna.metronet.com>,
: tadmc@metronet.com (Tad McClellan) wrote:
: > cjsub@hotmail.com wrote:
: > Whitespace is "folded" in the presentation of HTML (it is
: > ignored by the browser), so getting things lined up in
: > pretty columns is unneeded work, since the browser will
: > undo the work anyway.
: Is this true if you are passing the data into HTML Borders
: with cells and rows ??
I dunno.
That is not a Perl question.
There is another newsgroup for discussing HTML:
comp.infosystems.www.authoring.html
But if whitespace in HTML does matter, I'm still fairly
certain you can get what you want without formats.
: > print() with a here-doc is handy for outputting a block
: > of text, such as the head/tail of the HTML output:
: >
: > print <<'ENDHTML';
: > Content-Type: text/html
: >
: > <html>
: > <head>
: > <title>My Web Page</title>
: > </head>
: > <body>
: > ENDHTML
: So this produces the headers portion of each html document ??
Type it in.
Run it.
See what it does.
No need to post such questions...
: then you would use another print <<
: for the body ??
: and a third for the ending ??
You use what is appropriate for the job.
here-docs are just another form of quoting like single/double quotes.
Go read about it if you want to know about it.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 5 Apr 1999 06:30:57 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Perl Question for generating HTML
Message-Id: <ebohlmanF9pE3L.111@netcom.com>
trimbleman@hotmail.com wrote:
: In article <1rs4e7.61h.ln@magna.metronet.com>,
: tadmc@metronet.com (Tad McClellan) wrote:
: >
: > Perl's 'format' is handy for producing columnated reports,
: > though I have never needed it in several years of Perl
: > programming (I get what I need with (s)printf).
: >
: > Whitespace is "folded" in the presentation of HTML (it is
: > ignored by the browser), so getting things lined up in
: > pretty columns is unneeded work, since the browser will
: > undo the work anyway.
: Is this true if you are passing the data into HTML Borders
: with cells and rows ??
Yep. The only possible place in HTML where Perl formats might be useful
is generating material to be included in <PRE> blocks. Outside of <PRE>,
HTML is a character-stream medium, not a row-and-column medium, even
though it can be *rendered* in a row-and-column fashion.
------------------------------
Date: Mon, 05 Apr 1999 00:21:51 -0400
From: "Bill Jones" <bill@fccj.org>
Subject: Re: Perl/CGI with Frontpage PWS
Message-Id: <37083a7e.0@usenet.fccj.cc.fl.us>
In article <5WCN2.4482$LX.1702230@WReNphoon3>, oekilla@aol.com wrote:
> How do I run a cgi script with Microsoft Personal Web Server. Does PWS
> support Perl? I've created a perl cgi and placed it in the CGI-BIN folder.
> It works from the Dos command when I run it but I get the good ol' 500
> Server Error when run from IE4. Anyone Please.
>
You can, see http://reference.perl.com/query.cgi?section=windows
as a good starting place.
HTH,
-Sneex- :]
________________________________________________________________________
Bill Jones | FCCJ Webmaster | http://www.fccj.org/cgi/mail?webmaster
FCCJ | 501 W State St | Jacksonville, FL 32202 | 1 (904) 632-3089
Jacksonville Perl Mongers
http://jacksonville.pm.org
jax@jacksonville.pm.org
------------------------------
Date: Mon, 05 Apr 1999 00:20:21 -0400
From: "Bill Jones" <bill@fccj.org>
Subject: Re: Reading local files
Message-Id: <37083a25.0@usenet.fccj.cc.fl.us>
In article <zH7N2.806$eJ.144930@news.shore.net>, "Andy Watts"
<adwats@spaceweb.com> wrote:
> How does one get a perl script to read a local file from a computer?
>
> I'm working on a perlscript for a remote NT server, and I have had severe
> problems trying to read local files...
>
> I've tried reading files in the way of "C:/Temp/filename.txt". I've also
> tried both the read and open methods, as well as an $ftp->put and an
> $FTP->Put, using the Win32::Internet and Net::FTP libraries. Both I have
> manage to get working on moving files on the remote site... neither I have
> been able to have much success with utilizing local files on a desktop.
>
You can, see http://reference.perl.com/query.cgi?section=windows
as a good starting place.
Also, you may wish to look into SMB - local and remote...
HTH,
-Sneex- :]
________________________________________________________________________
Bill Jones | FCCJ Webmaster | http://www.fccj.org/cgi/mail?webmaster
FCCJ | 501 W State St | Jacksonville, FL 32202 | 1 (904) 632-3089
Jacksonville Perl Mongers
http://jacksonville.pm.org
jax@jacksonville.pm.org
------------------------------
Date: 05 Apr 1999 06:35:50 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Scope of variables
Message-Id: <923294219.317126@thrush.omix.com>
Ted <tszeto@mindspring.com> wrote:
: As a rule of thumb, is it generally a good idea to limit the scope of
: variables to their subroutines?
As a rule of thumb, it is generally a good idea to limit the scope
of variables to as small a scope as possible, which may not even
be as large as an entire function:
my $foo;
...code passes...
foreach my $for (@list) {
this_foo_is_only_seen_in_this_foreach($foo);
}
now_we_have_the_first_foo_again($foo);
: I remeber in a beginning C class I took, that the scope of variables was
: limited to their functions. This seemed to help cut confusion.
Yes.
--
-Zenin (zenin@archive.rhps.org)
Yah, Emacs is a good OS, but I prefer FreeBSD.
------------------------------
Date: Mon, 05 Apr 1999 00:14:21 -0400
From: "Bill Jones" <bill@fccj.org>
Subject: Re: Sending a email using PERL
Message-Id: <370838be.0@usenet.fccj.cc.fl.us>
Your script leaves some loop holes, please try -
http://www.fccj.org/Webmaster/mail.txt
It may prove more useful.
NOTE: Save it as 'mail' (or whatever name you
prefer) and store it as a cgi.
HTH,
-Sneex- :]
________________________________________________________________________
Bill Jones | FCCJ Webmaster | http://www.fccj.org/cgi/mail?webmaster
FCCJ | 501 W State St | Jacksonville, FL 32202 | 1 (904) 632-3089
Jacksonville Perl Mongers
http://jacksonville.pm.org
jax@jacksonville.pm.org
----------
In article <yO6N2.1536$04.1237@stones>, "Sandwell"
<JK@sandwell98.free-online.co.uk> wrote:
> I am writing a script which requires sending a email to the web master. I
> have tried the following script, without much luck. I have pasted the FULL
> script, if you could be give me an ideas??
>
> #!/usr/bin/perl -w
>
> $to='graeme\@sandwell98.free-online.co.uk';
> $from='graeme\@sandwell98.free-online.co.uk';
> $subject='Thank you for your inquiry';
> $text='Dear reader\n\nThank you for your recent inquiry.';
>
> &email($to,$from,$subject,$text);
>
> sub email {
> local($to,$from,$sub,$letter) = @_;
> $to=~s/@/\@/;
> $from=~s/@/\@/;
> open(MAIL, "|/usr/sbin/sendmail") || die
> "Content-type: text/text\n\nCan't open /usr/lib/sendmail!";
> print MAIL "To: $to\n";
> print MAIL "From: $from\n";
> print MAIL "Subject: $sub\n";
> print MAIL "$letter\n";
>
> Thank-You for you help,
>
>
>
>
------------------------------
Date: 5 Apr 1999 02:26:27 -0400
From: dha@panix.com (David H. Adler)
Subject: Re: Silicon Valley Perl Mongers?
Message-Id: <slrn7gglsi.8gr.dha@panix.com>
On 04 Apr 1999 14:06:45 -0500, Kent Perrier <kperrier@blkbox.com> wrote:
>brian@pm.org (brian d foy) writes:
>
>> The Perl Mongers site <URL:http://www.pm.org> has all the details
>> that one needs to know to get a group up and running.
>
>Shouldn't that be www.class.org? :)
www.jm.org, I would think. And only for very particular values of
$date. :-)
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
"Your point being..." - Homer Simpson
------------------------------
Date: Mon, 05 Apr 1999 00:08:58 -0400
From: "Bill Jones" <bill@fccj.org>
Subject: Re: Silicon Valley Perl Mongers?
Message-Id: <37083778.0@usenet.fccj.cc.fl.us>
In article <7e493k$rk1$1@nnrp1.dejanews.com>, hwy280@yahoo.com wrote:
>
>
> Please correct if I'm wrong. But I find it really strange that there
> is NO Perl user group in Silicon Valley, where the use of Perl is
> everywhere and created such enormous wealth, and where I believe
> LW lives. Why is that? :-)
>
Don't ask why ...
Start one, see http://www.pm.org/ and http://www.pm.org/groups.shtml
-Sneex- :]
________________________________________________________________________
Bill Jones | FCCJ Webmaster | http://www.fccj.org/cgi/mail?webmaster
FCCJ | 501 W State St | Jacksonville, FL 32202 | 1 (904) 632-3089
Jacksonville Perl Mongers
http://jacksonville.pm.org
jax@jacksonville.pm.org
------------------------------
Date: Mon, 05 Apr 1999 00:03:19 -0400
From: "Bill Jones" <bill@fccj.org>
Subject: Re: SQL help please (newbie question)
Message-Id: <37083625.0@usenet.fccj.cc.fl.us>
Um, PMFJI, but how about
http://reference.perl.com/query.cgi?section=database
Instead?
-Sneex- :]
________________________________________________________________________
Bill Jones | FCCJ Webmaster | http://www.fccj.org/cgi/mail?webmaster
FCCJ | 501 W State St | Jacksonville, FL 32202 | 1 (904) 632-3089
Jacksonville Perl Mongers
http://jacksonville.pm.org
jax@jacksonville.pm.org
----------
In article <ebohlmanF9Ktwp.8E7@netcom.com>, Eric Bohlman
<ebohlman@netcom.com> wrote:
> R&K <rnichols@airnet.net> wrote:
> : Could somebody please point me to some internet resources using perl with an
> : sql database. Tutorials preferably.
>
> Take a look at <URL:http://reference.perl.com/query.cgi?datadbase>.
>
------------------------------
Date: Sun, 04 Apr 1999 23:56:57 -0400
From: "Bill Jones" <bill@fccj.org>
Subject: Re: The ultimate challenge
Message-Id: <370834a6.0@usenet.fccj.cc.fl.us>
In article <3704CF46.FBE6F4D2@primary.net>, William Tammen
<tazmen@primary.net> wrote:
> I need a way to design a link that will
<snip>
I need $600 a day and all your problems will go away :)
> This problem must be solved since dhtml can not be
> integrated with cgi due to the natural static nature of cgi responses
'natural static nature of cgi responses' ???
Has either you or Dan heard of mod_perl ?
Maybe Apache? No?
I was able, however, to avoid a headache
while reading your question; Curious,
to say the least...
-Sneex-
________________________________________________________________________
Bill Jones | FCCJ Webmaster | http://www.fccj.org/cgi/mail?webmaster
FCCJ | 501 W State St | Jacksonville, FL 32202 | 1 (904) 632-3089
Jacksonville Perl Mongers
http://jacksonville.pm.org
jax@jacksonville.pm.org
------------------------------
Date: Sun, 04 Apr 1999 23:46:35 -0400
From: "Bill Jones" <bill@fccj.org>
Subject: Re: using perl CGI to automatically post data to an HTML form
Message-Id: <37083238.0@usenet.fccj.cc.fl.us>
In article <3705f69f.4861893@news.msen.com>, sweet@enterpriseusa.com (Rob
Sweet) wrote:
> I need to have a Perl CGI script "automatically" fill out an HTML form
> and "click" submit. It seems like this shouldn't be that hard, but
> I've looked through CGI.pm and libnet.pm and haven't come up with
> anything.
>
> Oh, one more thing... There are specific reasons why I can't simply
> bypass the form and call the CGI that it calls, I've already examined
> that route.
This isn't a CGI problem, CGI's are *usually* executed
by a browser action, so you should really look at LWP again.
The answer is in there; or you could just custom write a
browser in perl yourself. Pretty straight forward,
there are some code examples on CPAN.
(BTW: The rest of the group should note that I did say usually.)
Also, I am curious: How does your 'client' know what to
say (or fill-in if you prefer) on this remote HTML form?
HTH,
-Sneex- :]
________________________________________________________________________
Bill Jones | FCCJ Webmaster | http://www.fccj.org/cgi/mail?webmaster
FCCJ | 501 W State St | Jacksonville, FL 32202 | 1 (904) 632-3089
Jacksonville Perl Mongers
http://jacksonville.pm.org
jax@jacksonville.pm.org
------------------------------
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 5298
**************************************