[23124] in Perl-Users-Digest
Perl-Users Digest, Issue: 5345 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Aug 12 03:05:46 2003
Date: Tue, 12 Aug 2003 00:05:09 -0700 (PDT)
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, 12 Aug 2003 Volume: 10 Number: 5345
Today's topics:
Re: "Undefined subroutine" error (but it's defined, I t <ben.goldberg@hotpop.com>
Re: connecting to a database (with no web server) <jwillmore@cyberia.com>
creating a new file (MJS)
Re: creating a new file <nap@illx.org>
Re: creating a new file <nap@illx.org>
Re: creating a new file (Tad McClellan)
Re: creating a new file (Tad McClellan)
Re: extract strings between alternating text (Lydia Shawn)
Re: FTP doesn't add Carriage Return from VMS to NT? <ais01479@aeneas.net>
How to Add Username/Password for SMTP Authentication in (Chinadian)
Re: How to find the info from documentation quickly?? <wwonko@rdwarf.com>
MLDBM (Jeff Mott)
Re: PERL, FTP and Browser Upload <jwillmore@cyberia.com>
Re: Regexp problem <ben.goldberg@hotpop.com>
Re: Script displays in dos window, not browser <joe@burnettworks.com>
Re: Script displays in dos window, not browser <joe@burnettworks.com>
Re: Script displays in dos window, not browser <joe@burnettworks.com>
Re: Script displays in dos window, not browser <joe@burnettworks.com>
using a directory name as a command line argument (Chad)
Re: using a directory name as a command line argument <bharn_S_ish@te_P_chnologi_A_st._M_com>
Re: using a directory name as a command line argument (Tad McClellan)
Re: Win32-OLE excel cell reference. <bwalton@rochester.rr.com>
Re: <bwalton@rochester.rr.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 11 Aug 2003 22:58:01 -0400
From: Benjamin Goldberg <ben.goldberg@hotpop.com>
Subject: Re: "Undefined subroutine" error (but it's defined, I think?)
Message-Id: <3F3857B9.81D18EA1@hotpop.com>
valerian2@hotpop.com wrote:
[snip]
> package My::DB;
>
> use strict;
> use Exporter;
> use My::SOAP; # XXX this line causes the problem
> use vars qw(@ISA @EXPORT);
> @ISA = ('Exporter');
> @EXPORT = qw(DB_Connect DB_Disconnect);
[snip function definitions]
> # SOAP functions, for exchanging data with remote site
> package My::SOAP;
>
> use strict;
> use Exporter;
> use My::Misc; # XXX this line causes the problem
> use vars qw(@ISA @EXPORT);
> @ISA = ('Exporter');
> @EXPORT = qw(GetRemoteData);
[snip function definition]
Remember that 'use' happens at compile time, and @EXPORT= and @ISA=
happen at run time.
If you changed the beginnings of these three modules to:
package My::DB;
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(DB_Connect DB_Disconnect);
}
use strict;
use My::SOAP;
And:
package My::SOAP;
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(GetRemoteData);
}
use strict;
use My::Misc
And:
package My::Misc;
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(SafeError);
}
use strict;
use My::DB;
Then it *should* work. [but since this code is untested, don't sue me
if it doesn't.]
--
$a=24;split//,240513;s/\B/ => /for@@=qw(ac ab bc ba cb ca
);{push(@b,$a),($a-=6)^=1 for 2..$a/6x--$|;print "$@[$a%6
]\n";((6<=($a-=6))?$a+=$_[$a%6]-$a%6:($a=pop @b))&&redo;}
------------------------------
Date: Tue, 12 Aug 2003 04:53:07 GMT
From: James Willmore <jwillmore@cyberia.com>
Subject: Re: connecting to a database (with no web server)
Message-Id: <20030812005456.64aafd19.jwillmore@cyberia.com>
<snip>
> $host = "127.0.0.1"; # = "localhost", the server your are on.
The '#' is a comment - and it's states what $host means (although, I
would have wrote - "the server you wish to connect to").
The numbers are the IP address for the host. To change the host you
want to connect to, change the numbers to the proper IP address - or -
use the hostname of the server you wish to connect to.
<snip>
>
> Could post the ideal code for any database connection (and
> particularly Oracle)
Install the DBD::Oracle module. HOWEVER, BEFORE you install the
module - READ the documentation FIRST. If you have questions specific
to how to use the module, then feel free to post them here -
otherwise, do not post non-Perl questions here.
HTH
Jim
------------------------------
Date: 11 Aug 2003 22:22:35 -0700
From: tabletdesktop@yahoo.com (MJS)
Subject: creating a new file
Message-Id: <f0171209.0308112122.60c93d76@posting.google.com>
I need to write a script which when run will create a new text file
depending if there is another text file which contains certain string
e.g. [abc]. The file should be created on the strings first occurance
and the rest occurances, if any, should be ignored.
Thanks in anticipation
------------------------------
Date: Tue, 12 Aug 2003 00:24:26 -0600
From: Nick Pinckernell <nap@illx.org>
Subject: Re: creating a new file
Message-Id: <87zniffl5x.fsf@blitz.illx.org>
#Open the 1st file,
open(IN, "file1") or die "Can't open file1: $!\n";
#search for the string
while(<IN>) {
if(/abc/) {
#found 'abc' so open the 2nd file for writing
open(OUT, ">file2") or die "Can't open file2: $!\n";
print OUT "foo\n";
close(OUT);
}
}
close(IN);
Have not tested this code,
but, hope that helps
_nick
------------------------------
Date: Tue, 12 Aug 2003 00:26:28 -0600
From: Nick Pinckernell <nap@illx.org>
Subject: Re: creating a new file
Message-Id: <87vft3fl2j.fsf@blitz.illx.org>
Oh, and sorry.. I forgot to mention,
that would create the 2nd file every occurance
of 'abc'.
You'd have to put a counter in, and increment
it when you found 'abc', and if the counter == 1,
than write out the file.
sorry,
_nick
------------------------------
Date: Tue, 12 Aug 2003 01:23:55 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: creating a new file
Message-Id: <slrnbjh1vr.20c.tadmc@magna.augustmail.com>
MJS <tabletdesktop@yahoo.com> wrote:
> I need to write a script which when run will create a new text file
> depending if there is another text file which contains certain string
> e.g. [abc]. The file should be created on the strings first occurance
> and the rest occurances, if any, should be ignored.
>
> Thanks in anticipation
Anticipation of what?
An answer?
To what? You did not ask a question.
What part are you stuck on?
Show us the code you have so far, and we will help you fix it.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Tue, 12 Aug 2003 01:29:33 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: creating a new file
Message-Id: <slrnbjh2ad.20c.tadmc@magna.augustmail.com>
MJS <tabletdesktop@yahoo.com> wrote:
> I need to write a script
I need to lose 15 pounds.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 11 Aug 2003 15:29:05 -0700
From: apfeloma@hotmail.com (Lydia Shawn)
Subject: Re: extract strings between alternating text
Message-Id: <1240b4dc.0308111429.31bd03b0@posting.google.com>
oh it works. thanks a lot guys!
sorry for my ignorance!
..
lydia
"Eric J. Roode" <REMOVEsdnCAPS@comcast.net> wrote in message news:<Xns93D34AB855A46sdn.comcast@206.127.4.25>...
> -----BEGIN xxx SIGNED MESSAGE-----
> Hash: SHA1
>
> apfeloma@hotmail.com (Lydia Shawn) wrote in
> news:1240b4dc.0308100156.2728ebcc@posting.google.com:
>
> > hi eric,
> >
> >> You want to match
> >> The string "trigger1" or "trigger2"
> >> followed by possible whitespace
> >> followed by digits (and maybe a decimal point?)
> >> followed by more possible whitespace
> >> followed by the string "trigger3" or "trigger4"
> >
> > exactly right! the variable was a mistake in my earlier posting but
> > you got it anyway!
> >
> > for some reason though the | doesn't seem to do it's job..
> >
> > =~ /(trigger1|trigger2)\s*([\d.]+)\s*(trigger3|trigger4)/six;
> >
> > returns "trigger1"
> >
> > but when i leave out the | like here:
> >
> > =~ /trigger2\s*([\d.]+)\s*trigger4/six;
> > it matches the number between trigger1 and trigger4 properly..
> > i'd want to match all three though!
>
> There are three sets of parentheses in the pattern, therefore three
> strings are returned. I suspect you're only checking the first, or
> you're only looking at $1.
>
> - --
> Eric
> $_ = reverse sort $ /. r , qw p ekca lre uJ reh
> ts p , map $ _. $ " , qw e p h tona e and print
>
> -----BEGIN xxx SIGNATURE-----
> Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
>
> iQA/AwUBPzYqiGPeouIeTNHoEQIkQACg66NHgFvWoLYFET68eRLnzPvxszwAn0M7
> C4B9NToDB3OuCKgj/f+j+mw/
> =kZNU
> -----END PGP SIGNATURE-----
------------------------------
Date: Mon, 11 Aug 2003 21:38:50 -0500
From: Jay Emm Dee <ais01479@aeneas.net>
Subject: Re: FTP doesn't add Carriage Return from VMS to NT?
Message-Id: <3F38533A.20305@aeneas.net>
I hope the confusion over 012 and 015 v. 10 and 13 has been
cleared up. They sre both values for CR and LF - in octal and
decimal.
Mike O'Neal wrote:
> James Willmore <jwillmore@cyberia.com> wrote in message news:<20030809010631.315ab36d.jwillmore@cyberia.com>...
>
>><snip>
>>
>>>Anyone have suggestions why I'm not getting my CR/LF as expected?
>>
>>I posted a suggestion on this issue within the last 3 weeks. Plus,
>>someone else responded that the issue appears to lie with W2K.
>>
>>The thread has the subject:
>>FTP in ASCII mode from UNIX to NT
>>
>>Same type of issue - line endings fouled.
>>
>>HTH
>>
>>Jim
>
>
> Jim, I read your issue, and if it's notepad you need to read it in,
> just use Wordpad! Voila, problem solved, since it is content to use
> LF as a terminator. My problem is proprietary software that NEEDS the
> expected CR/LF. I know I can post-process the files, but there's a
> bunch and I'd like a better solution if possible.
>
> Does anyone know if the "A" module I mention above is the right place,
> or perhaps elsewhere?
------------------------------
Date: 11 Aug 2003 22:11:55 -0700
From: chinadian@ma.2y.net (Chinadian)
Subject: How to Add Username/Password for SMTP Authentication in MIME::Lite?
Message-Id: <d2db6519.0308112111.7014f8@posting.google.com>
Is it possible to use MIME::Lite using a SMTP server that needs
authentication?
My provider now demands authentification when sending mail via SMTP.
I liked MIME:Lite, because it is the only one working right for me
with attachment. But I don't know how to added password/username.
In Net::SMTP:
auth ( USERNAME, PASSWORD )
Attempt SASL authentication
In MIME:Lite:
send_by_smtp ARGS...
Instance method. Send message via SMTP, using Net::SMTP. The optional
ARGS are sent into Net::SMTP::new(): usually, these are
MAILHOST, OPTION=>VALUE, ...
But Auth has two inputs. So do I do
$msg = MIME::Lite->new(
To =>"a@a.com",
Subject =>"$sub",
auth => "username, password")
or
MIME::Lite->auth (username, password);
MIME::Lite->send('smtp', "remotehost", Timeout=>60);
or
MIME::Lite->send('smtp', "remotehost", auth=> "username, password",
Timeout=>60);
------------------------------
Date: Mon, 11 Aug 2003 20:32:01 +0000 (UTC)
From: Louis Erickson <wwonko@rdwarf.com>
Subject: Re: How to find the info from documentation quickly??
Message-Id: <bh8ug1$jga$1@holly.rdwarf.com>
Bill Smith <wksmith@optonline.net> wrote:
: "Tad McClellan" <tadmc@augustmail.com> wrote in message
: news:slrnbjf507.int.tadmc@magna.augustmail.com...
:> hou <dhouremove@rohan.sdsu.edu> wrote:
:>
:> > How can I get the information I need quickly from
:> > the perl documentation??
:>
:>
:> By grep()ing it for terms relevant to the current problem.
:>
: --snip--
: On my windows system, I use tcgrep from the "Perl Cookbook". I modified
: it to do the file glob that Unix shells do for you. This is a very
: powerful version of grep, but it is not very fast. Any other
: suggestions?
The Start button has a "Search" option with "Find Files Or Folders" or
something like that, which is pretty good for finding phrases in documentation.
It doesn't have regular expressions, but does okay otherwise.
Visual Studio does have regular expressions, but most people regard that as
overkill. I am not among that group. It's a fine text editor, althuogh
I've been using vim lately.
There are many ports of the standard grep to Windows; Google will be
your friend. The GNU web site may have some.
Cygwin has one, but it may be more trouble than it's worth for this particular
task.
Personally, I think your Perl solution a good and very portable one.
--
Louis Erickson - wwonko@rdwarf.com - http://www.rdwarf.com/~wwonko/
"I don't care who does the electing as long as I get to do the
nominating" -- Boss Tweed
------------------------------
Date: 11 Aug 2003 19:45:09 -0700
From: mjeff1@twcny.rr.com (Jeff Mott)
Subject: MLDBM
Message-Id: <970676ed.0308111845.5f975db5@posting.google.com>
Is there a wrapper to perform encryption on an MLDBM database? Since
file permissions is a Unix-only feature, I'd prefer not to rely on
that. Data encryption would appear to be the only cross platform way
to keep the data secure. Unless someone has any better ideas...?
Also, am I able to lock this type of database? I did some testing and
it does not appear to force other processes to wait. Thus all the
usual race conditions and possibilities for corrupting the data
emerge.
------------------------------
Date: Tue, 12 Aug 2003 05:10:00 GMT
From: James Willmore <jwillmore@cyberia.com>
Subject: Re: PERL, FTP and Browser Upload
Message-Id: <20030812011149.4f6d068d.jwillmore@cyberia.com>
> I'd love to get them all to use an ftp client but realistically its
> not going to happen so I want to have users select files in their
> browser from their local system, press a button and Binary FTP the
> files into a pre created directory on an ftp server. There seem to
> be various scripts around that say they do this but on closer
> inspection they start getting a bit vague and I'm not convinced that
> they are actually using FTP as opposed to HTTP.
>
> Can anyone point me to a Perl CGI FTP script that will do this -
> doesn't matter if it's a commercial one cos this is worth paying for
> if it does the job. Failing that can anyone give me some pointer
> ideas on how to start writing my own so I can set off in the right
> direction.
I guess you have the 'point-and-click' users versus ones who can read
directions. If that's the case, you may want to use the Tk module and
Net::FTP to accomplish what you're looking for. The plus side is that
the users will get a GUI to use, similar to Windows Exploer. The down
side is distribution of the script - if you have many users spread out
to the four winds, this could present some real issues - which is
probably why you asked for a browser based solution.
There is a way to distribute a Perl::Tk script through the browser.
There's a plugin that, last I checked, was still being developed.
It's called PerlPlusPlugin, but I'm not sure how active the
development is today - it was about a year ago when I tried it out.
Best bet is to, I hate to say it, but use the Java Applet that someone
else suggested. It seems to fit the bill pretty well.
HTH
Jim
------------------------------
Date: Mon, 11 Aug 2003 23:05:41 -0400
From: Benjamin Goldberg <ben.goldberg@hotpop.com>
Subject: Re: Regexp problem
Message-Id: <3F385985.612B767A@hotpop.com>
J Krugman wrote:
>
> Suppose I have some lengthy and/or complicated sub-regexp such as
> '(foo|bar|...)', how do I write a regexp that will match it, followed
> by some white space, followed by something that is neither foo or
> bar? I.e. I want this to match:
>
> bar frobozz
>
> but not this:
>
> bar foo
my $first_part = qr/foo|bar|.../;
my $regex = qr/$first_part \s+ (?!$first_part) \S/x;
I'm not entirely sure how perl optomizes this, so you might want to
prevent perl from backtracking over the \s+, as follows:
my $regex = qr/$first_part (?>\s+) (?!$first_part) \S/x;
This should only have a significant effect if you've got a string such
as "bar foo" (with lots of whitespace in between the two
parts). Without the (?>) it might take an excessive time to fail.
--
$a=24;split//,240513;s/\B/ => /for@@=qw(ac ab bc ba cb ca
);{push(@b,$a),($a-=6)^=1 for 2..$a/6x--$|;print "$@[$a%6
]\n";((6<=($a-=6))?$a+=$_[$a%6]-$a%6:($a=pop @b))&&redo;}
------------------------------
Date: Tue, 12 Aug 2003 00:49:26 GMT
From: "Joe Burnett" <joe@burnettworks.com>
Subject: Re: Script displays in dos window, not browser
Message-Id: <HjWZa.86463$Vt6.28559@rwcrnsc52.ops.asp.att.net>
Thanks, Alan, Gregory and Jürgen,
I tried your suggestions to no avail on my home based Windows XP system. I
have located a linux based
web server that runs both myscript.cgi and myscript.pl with the expected
results showing up in my browser.
I am able to develope now. I'll get back to my home system later this week.
Thanks again,
Joe Burnett
"Alan C." <a@c.com> wrote in message
news:vjeok03u3v0r10@corp.supernews.com...
> "Joe Burnett" <joe@burnettworks.com> wrote in message
> news:KluZa.113785$Ho3.14438@sccrnsc03...
> > Hello,
> >
> > I am trying to run a trivial perl script, but the results either get
> > displayed in a dos window,
> > or the source code gets displayed in a browser. The former happens when
I
> > open the script
> > in IE with a pl extension. The latter happens if I open the script with
a
> > cgi extension.
>
> But how is the open accomplished? is it like do you enter into the
address
> bar of the browser something near/like:
>
> http://localhost/cgi-bin/myscript.cgi
>
> >Both
> > scripts reside in "C:\Program Files\Apache Group\Apache2\cgi-bin".
>
> File location looks ok. What happen if U do
> localhost/cgi-bin/scriptname.cgi as I mentioned further above
>
> --
>
> http://perl.about.com/cs/beginningperl/
>
> http://perl.about.com/cs/intermediateperl/
>
> very near those above two is also some cgi info. a "Perl 101 class" which
> focuses on Perl cgi & web server a few basics
>
> --
> Alan.
>
>
>
------------------------------
Date: Tue, 12 Aug 2003 00:49:27 GMT
From: "Joe Burnett" <joe@burnettworks.com>
Subject: Re: Script displays in dos window, not browser
Message-Id: <FoWZa.86466$Vt6.28835@rwcrnsc52.ops.asp.att.net>
Thanks, Alan, Gregory and Jürgen,
I tried your suggestions to no avail on my home based Windows XP system. I
have located a linux based
web server that runs both myscript.cgi and myscript.pl with the expected
results showing up in my browser.
I am able to develope now. I'll get back to my home system later this week.
Thanks again,
Joe Burnett
"Alan C." <a@c.com> wrote in message
news:vjeok03u3v0r10@corp.supernews.com...
> "Joe Burnett" <joe@burnettworks.com> wrote in message
> news:KluZa.113785$Ho3.14438@sccrnsc03...
> > Hello,
> >
> > I am trying to run a trivial perl script, but the results either get
> > displayed in a dos window,
> > or the source code gets displayed in a browser. The former happens when
I
> > open the script
> > in IE with a pl extension. The latter happens if I open the script with
a
> > cgi extension.
>
> But how is the open accomplished? is it like do you enter into the
address
> bar of the browser something near/like:
>
> http://localhost/cgi-bin/myscript.cgi
>
> >Both
> > scripts reside in "C:\Program Files\Apache Group\Apache2\cgi-bin".
>
> File location looks ok. What happen if U do
> localhost/cgi-bin/scriptname.cgi as I mentioned further above
>
> --
>
> http://perl.about.com/cs/beginningperl/
>
> http://perl.about.com/cs/intermediateperl/
>
> very near those above two is also some cgi info. a "Perl 101 class" which
> focuses on Perl cgi & web server a few basics
>
> --
> Alan.
>
>
>
------------------------------
Date: Tue, 12 Aug 2003 00:49:27 GMT
From: "Joe Burnett" <joe@burnettworks.com>
Subject: Re: Script displays in dos window, not browser
Message-Id: <TvWZa.86473$Vt6.28564@rwcrnsc52.ops.asp.att.net>
Thanks, Alan, Gregory and Jürgen,
I tried your suggestions to no avail on my home based Windows XP system. I
have located a linux based
web server that runs both myscript.cgi and myscript.pl with the expected
results showing up in my browser.
I am able to develope now. I'll get back to my home system later this week.
Thanks again,
Joe Burnett
"Alan C." <a@c.com> wrote in message
news:vjeok03u3v0r10@corp.supernews.com...
> "Joe Burnett" <joe@burnettworks.com> wrote in message
> news:KluZa.113785$Ho3.14438@sccrnsc03...
> > Hello,
> >
> > I am trying to run a trivial perl script, but the results either get
> > displayed in a dos window,
> > or the source code gets displayed in a browser. The former happens when
I
> > open the script
> > in IE with a pl extension. The latter happens if I open the script with
a
> > cgi extension.
>
> But how is the open accomplished? is it like do you enter into the
address
> bar of the browser something near/like:
>
> http://localhost/cgi-bin/myscript.cgi
>
> >Both
> > scripts reside in "C:\Program Files\Apache Group\Apache2\cgi-bin".
>
> File location looks ok. What happen if U do
> localhost/cgi-bin/scriptname.cgi as I mentioned further above
>
> --
>
> http://perl.about.com/cs/beginningperl/
>
> http://perl.about.com/cs/intermediateperl/
>
> very near those above two is also some cgi info. a "Perl 101 class" which
> focuses on Perl cgi & web server a few basics
>
> --
> Alan.
>
>
>
------------------------------
Date: Tue, 12 Aug 2003 01:27:48 GMT
From: "Joe Burnett" <joe@burnettworks.com>
Subject: Re: Script displays in dos window, not browser
Message-Id: <noXZa.86024$cF.27130@rwcrnsc53>
Thanks, Alan, Gregory and Jürgen,
I tried your suggestions to no avail on my home based Windows XP system. I
have located a linux based
web server that runs both myscript.cgi and myscript.pl with the expected
results showing up in my browser.
I am able to develope now. I'll get back to my home system later this week.
Thanks again,
Joe Burnett
"Alan C." <a@c.com> wrote in message
news:vjeok03u3v0r10@corp.supernews.com...
> "Joe Burnett" <joe@burnettworks.com> wrote in message
> news:KluZa.113785$Ho3.14438@sccrnsc03...
> > Hello,
> >
> > I am trying to run a trivial perl script, but the results either get
> > displayed in a dos window,
> > or the source code gets displayed in a browser. The former happens when
I
> > open the script
> > in IE with a pl extension. The latter happens if I open the script with
a
> > cgi extension.
>
> But how is the open accomplished? is it like do you enter into the
address
> bar of the browser something near/like:
>
> http://localhost/cgi-bin/myscript.cgi
>
> >Both
> > scripts reside in "C:\Program Files\Apache Group\Apache2\cgi-bin".
>
> File location looks ok. What happen if U do
> localhost/cgi-bin/scriptname.cgi as I mentioned further above
>
> --
>
> http://perl.about.com/cs/beginningperl/
>
> http://perl.about.com/cs/intermediateperl/
>
> very near those above two is also some cgi info. a "Perl 101 class" which
> focuses on Perl cgi & web server a few basics
>
> --
> Alan.
>
>
>
------------------------------
Date: 11 Aug 2003 19:31:26 -0700
From: chussung@operamail.com (Chad)
Subject: using a directory name as a command line argument
Message-Id: <97a530bb.0308111831.7532682e@posting.google.com>
trying to do a basic opendir DH,$dir or die.......
how do I get $dir to equal an argument invoked at the command line
Thanks
Chad
------------------------------
Date: Tue, 12 Aug 2003 02:36:33 GMT
From: Brian Harnish <bharn_S_ish@te_P_chnologi_A_st._M_com>
Subject: Re: using a directory name as a command line argument
Message-Id: <pan.2003.08.12.02.36.47.499027@te_P_chnologi_A_st._M_com>
On Mon, 11 Aug 2003 19:31:26 -0700, Chad wrote:
> trying to do a basic opendir DH,$dir or die.......
>
> how do I get $dir to equal an argument invoked at the command line
>
> Thanks
> Chad
Check out @ARGV
- Brian
------------------------------
Date: Mon, 11 Aug 2003 22:23:15 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: using a directory name as a command line argument
Message-Id: <slrnbjgnd3.1pl.tadmc@magna.augustmail.com>
Chad <chussung@operamail.com> wrote:
> how do I get $dir to equal an argument invoked at the command line
$dir= $ARGV[0];
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 11 Aug 2003 23:59:40 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: Win32-OLE excel cell reference.
Message-Id: <3F382DCE.10900@rochester.rr.com>
Richard S Beckett wrote:
> "Bob Walton" <bwalton@rochester.rr.com> wrote in message
> news:3F35A2D0.5020409@rochester.rr.com...
>
>>Richard S Beckett wrote:
...
>
>>Use Excel's object browser to help look up stuff like that. Your
>>question really isn't a Perl question, but, close enough I guess.
>>
>
> I don't understand. This is my biggest problem, I'm sure the information is
> available somewhere, but I have no idea where, or how to access it.
...
> R.
<way off topic>
To fire up Excel's object brower, first fire up Excel. Then hold the
Alt key down and push the F11 key. Then click the icon that looks like
a box with junk flying out of it, by default the third button from the
right on the toolbar (mouseover gives tooltip "object browser"). Type
in what it is you are looking for into the blank listbox. Under the
"class" column, look for the parent of the entity you are looking for.
Click on the member column. Brief usage information is shown at the
bottom. Push the F1 key for documentation. The examples are usually
the best help you will get. Then translate to Perl per the mechanistic
formula in perldoc Win32::OLE. I have typically learned more about OLE
by studying Perl apps from books and the web than I have by studying the
MS docs.
You can use the object browser provided with most OLE-aware Windoze apps
to find out how to access their classes, members and properties.
</way off topic>
--
Bob Walton
------------------------------
Date: Sat, 19 Jul 2003 01:59:56 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re:
Message-Id: <3F18A600.3040306@rochester.rr.com>
Ron wrote:
> Tried this code get a server 500 error.
>
> Anyone know what's wrong with it?
>
> if $DayName eq "Select a Day" or $RouteName eq "Select A Route") {
(---^
> dienice("Please use the back button on your browser to fill out the Day
> & Route fields.");
> }
...
> Ron
...
--
Bob Walton
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.
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 V10 Issue 5345
***************************************