[11732] in Perl-Users-Digest
Perl-Users Digest, Issue: 5332 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Apr 8 16:07:40 1999
Date: Thu, 8 Apr 99 13:00:18 -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 Thu, 8 Apr 1999 Volume: 8 Number: 5332
Today's topics:
Re: Adding to @INC <jglascoe@giss.nasa.gov>
Re: better way to write this script ? (Mike Mckinney)
Re: book: perl modules by Eric Foster-Johnson (brian d foy)
Re: Enclosing a binary within perl <cassell@mail.cor.epa.gov>
Re: Help with foxbase .dbf file open (Honza Pazdziora)
Re: Help with Perl return value 134 <cassell@mail.cor.epa.gov>
Help! Script works in Linux-dies in Windows <kashyap@libertynet.org>
Re: Help! Script works in Linux-dies in Windows (David Turley)
Re: HELP!! ON STRING COMPARING (Larry Rosler)
Re: HELP!! ON STRING COMPARING <jglascoe@giss.nasa.gov>
How do I send an email attachment with sendmail pipe <blavender@spk.usace.army.mil>
Re: How to close all file descriptors ? <jay@rgrs.com>
Re: How to close all file descriptors ? (RJ)
Re: How to pass parameters for perl programs under Acti <cassell@mail.cor.epa.gov>
Making logs <tutorrials@wanadoo.fr>
Re: matching non-ordered string <jglascoe@giss.nasa.gov>
Re: matching non-ordered string <jglascoe@giss.nasa.gov>
POP3 pearl script. <liam@hurontel.on.ca>
Re: POP3 pearl script. (David Turley)
Re: Quantum Variable <nospam_earnold@requisite.com>
Re: system-command under Win98 <cassell@mail.cor.epa.gov>
Re: Thread renamed to: where to find perl programming t <cassell@mail.cor.epa.gov>
translate is its name (was Re: =~tr / / /; problem) <uri@home.sysarch.com>
Re: Verifying existance of a file (I R A Aggie)
Re: Verifying existance of a file (I R A Aggie)
Re: zipped perlman <cassell@mail.cor.epa.gov>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 08 Apr 1999 13:50:45 -0400
From: Jay Glascoe <jglascoe@giss.nasa.gov>
To: Scott Ranzal <scott.ranzal@mci.com>
Subject: Re: Adding to @INC
Message-Id: <370CEC75.C9D5BC7B@giss.nasa.gov>
Scott Ranzal wrote:
>
> I would like to add to the directories that have been established for
> searching for Perl libraries. I am currently doing the additions within the
> scripts, but have several directories that I would like to add on a full
> time basis for every script.
>
there's the "-I" command-line option:
#! /usr/bin/perl -wI /usr/foo
see "perlrun"
Jay Glascoe
------------------------------
Date: Thu, 08 Apr 1999 18:13:58 GMT
From: mike@mike.local.net (Mike Mckinney)
Subject: Re: better way to write this script ?
Message-Id: <slrn7gpscg.453.mike@mike.local.net>
On Thu, 8 Apr 1999 11:27:17 -0400, Tad McClellan wrote:
>Mike Mckinney (mike@mike.local.net) wrote:
> Then don't use a here-doc, use a "normal" quoted string instead.
Excellent. I had for some reason gotten it into my head that I need a <<here
doc to avoid using several print statements, as I will surely be adding more
options.
Thanks for the advice on that.
--
mikemck@austin.rr.com
------------------------------
Date: Thu, 08 Apr 1999 15:17:51 -0400
From: brian@pm.org (brian d foy)
Subject: Re: book: perl modules by Eric Foster-Johnson
Message-Id: <brian-ya02408000R0804991517510001@news.panix.com>
In article <7ehjpc$hvg$1@news.fsu.edu>, bismuti@cs.fsu.edu (Peter Bismuti) posted:
> Has anyone read the book "Perl Modules" by Eric Foster-Johnson :
>
> Paperback - 400 pages Bk&Cd Rom edition (March 1998)
> IDG Books Worldwide
> ISBN: 1558515704
> Dimensions (in inches): 1.20 x 9.28 x 7.45
>
> Is it worth buying??
i saw that one in a bookstore. it was not impressive, but then,
no printed version of CPAN has been.
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>
------------------------------
Date: Thu, 08 Apr 1999 11:49:42 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Enclosing a binary within perl
Message-Id: <370CFA46.EBFF9070@mail.cor.epa.gov>
Philip Newton wrote:
>
> Larry Rosler wrote:
> >
> > Also, the faster 'match a fixed string' algorithm (also used by perl's
> > grep function) is available via the 'grep -F' option.
>
> I've heard that 'grep -E' or 'egrep' is faster than 'grep -F' or
> 'fgrep'. Never benchmarked the two, though. If that's the case, maybe
> the only use for grep -F is searching for strings containing regex
> characters such as *+[] etc.
>
> Cheers,
> Philip
But YMMV. Jeffrey Friedl has some discussion on this in his book
'Mastering Regular Expressions'.
David
--
David Cassell, OAO
cassell@mail.cor.epa.gov
Senior Computing Specialist phone: (541)
754-4468
mathematical statistician fax: (541)
754-4716
------------------------------
Date: Thu, 8 Apr 1999 18:57:57 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: Help with foxbase .dbf file open
Message-Id: <F9vwoL.4AA@news.muni.cz>
> Can some point me in the direction of some comprehensive documentation
> on writing to foxbase .dbf files using XBase on a SCO 5.0 operating
> system.
You mean except the man pages that come with XBase/DBD::XBase?
--
------------------------------------------------------------------------
Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
make vmlinux.exe -- SGI Visual Workstation Howto
Any spam sent to my email will be rewarded by complaint to your ISP abuse
team and abuse teams of servers that relayed that message. It works.
------------------------------
Date: Thu, 08 Apr 1999 11:56:52 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Help with Perl return value 134
Message-Id: <370CFBF4.61F9EF2A@mail.cor.epa.gov>
Pete McNab wrote:
>
> Morning.
>
> We are having some trouble with a perl script that aborts in a
> non-repeatable fashion with the following text:
>
> Error: Runtime exception^M
> [1] + Done (134) ?^M
> 188 Abort perl^M
>
> The second numerical error (188) is different every time the error
> occurs. This error is happening on a perl script called by the
> MKS shell on an Alpha-NT.
>
> If anyone can point me towards what this error indicates, or even
> an online resource for perl errors I would be most appreciative.
> The perl.com documents have proven to be not particularly useful
> for this, and my web searches haven't turned up anything of
> value.
>
> Thanks.
>
> Pete
If you take a look in the perldiag manpage, you'll see that this is
*not*
a Perl error message. What do the MKS shell docs say about this error?
Sorry I can't help more, but maybe this will get you started,
David
--
David Cassell, OAO
cassell@mail.cor.epa.gov
Senior Computing Specialist phone: (541)
754-4468
mathematical statistician fax: (541)
754-4716
------------------------------
Date: Thu, 08 Apr 1999 14:17:58 -0400
From: Ramkumar Kashyap <kashyap@libertynet.org>
Subject: Help! Script works in Linux-dies in Windows
Message-Id: <370CF2D6.61B48ECD@libertynet.org>
Hi!
I would like to get the following script to run in the windows
environment from netscape fastrack server.
It runs fine on Linux, but I tried running it from the command line in
win95 and get the "die" message.
Please e-mail all responses.
regards,
Kumar
********
#!/usr/local/bin/perl
$mail_prog = '/usr/lib/sendmail' ;
# ***ENDAUTOGEN:HEADER*** Do NOT modify this line!! You may enter
custom code after this line.
# ***AUTOGEN:INPUT*** Do NOT modify this line!! Do NOT enter custom code
in this section.
&GetFormInput;
# The intermediate variables below make your script more readable
# but somewhat less efficient since they are not really necessary.
# If you do not want to use these variables, clear the
# Intermediate Variables checkbox in the Tools | Options dialog box, CGI
Wizard tab.
$txtDate = $field{'txtDate'} ;
$txtTime = $field{'txtTime'} ;
$txtBill = $field{'txtBill'} ;
$txtDescription = $field{'txtDescription'} ;
$txtSpeaker = $field{'txtSpeaker'} ;
$txtStatus = $field{'txtStatus'} ;
# ***ENDAUTOGEN:INPUT*** Do NOT modify this line!! You may enter custom
code after this line.
$datafile= "aaa.htm";
print ("$datafile\n");
# ***AUTOGEN:VALIDATE*** Do NOT modify this line!! Do NOT enter custom
code in this section.
open(FILE, ">$datafile") || die "No way Jose!\n";
print "Setting $name to $value<P>";
print FILE ("<HTML>\n");
print File ("<HEAD>\n");
print File ("<TITLE>House GOP Session Information</TITLE>\n");
print File ('<META NAME="Author" CONTENT="Ramkumar Kashyap">\n');
print File ('<META NAME="Keywords" CONTENT="Session, Speaker,
Bill">\n');
print File ('<META NAME="Description" CONTENT="Displays House Session
Information">\n');
print File ("</HEAD>\n");
print File ('<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FF0000"
VLINK="#800000" ALINK="#FF00FF" BACKGROUND="?">\n');
print File ('<center><img SRC="images/Name2.gif" height=51
width=362></center>\n');
print FILE ('<TABLE ALIGN="left" BORDER=2 CELLSPACING=0 CELLPADDING=0
WIDTH="100%">\n');
print FILE ("<tr ALIGN=LEFT VALIGN=CENTER>");
print FILE ("<td><b><font size=+1>Date:</font></b></td>");
print FILE ("<B>Date:</B>");
print FILE ("<TD> $txtDate </TD>");
print FILE ("</TR>\n");
print FILE ("<TR>\n");
print FILE ("<td><b><font size=+1>Time:</font></b></td>");
#print FILE ('<TD>');
print FILE ("<td> $txtTime </td>");
print FILE ("</TR>\n");
print FILE ("<TR>\n");
print FILE ("<td><b><font size=+1>Bill:</font></b></td>");
print FILE ("<TD> $txtBill </TD>\n");
print FILE ("</TR>\n");
print FILE ("<TR>\n");
print FILE ("<td><b><font
size=+1>Description:</font></b></font</TD></td>");
#print FILE ('<B>Description:</B>');
print FILE ("<TD>");
print FILE ("$txtDescription");
print File ("</TD>");
print FILE ("</TR>");
print FILE ("<TR>");
print FILE ("<td><b><font size=+1>Speaker:</font></b></td>");
print FILE ("<td> $txtSpeaker </td>");
print FILE ("</TR>");
print FILE ("<TR>");
print FILE ("<td><b><font size=+1>Status:</font></b></td>");
print FILE ("<td> $txtStatus </td>");
print FILE ("</TABLE>");
print FILE ("</body>");
print FILE ("</HTML>");
# ***ENDAUTOGEN:VALIDATE*** Do NOT modify this line!! You may enter
custom code after this line.
# ***AUTOGEN:EMAIL*** Do NOT modify this line!! Do NOT enter custom code
in this section.
# ***ENDAUTOGEN:EMAIL*** Do NOT modify this line!! You may enter custom
code after this line.
# ***AUTOGEN:HTML*** Do NOT modify this line!! Do NOT enter custom code
in this section.
# ***ENDAUTOGEN:HTML*** Do NOT modify this line!! You may enter custom
code after this line.
# ***AUTOGEN:ERRPRINT*** Do NOT modify this line!! Do NOT enter custom
code in this section.
# ***ENDAUTOGEN:ERRPRINT*** Do NOT modify this line!! You may enter
custom code after this line.
# ***AUTOGEN:PARSE*** Do NOT modify this line!! Do NOT enter custom code
in this section.
sub GetFormInput {
(*fval) = @_ if @_ ;
local ($buf);
if ($ENV{'REQUEST_METHOD'} eq 'POST') {
read(STDIN,$buf,$ENV{'CONTENT_LENGTH'});
}
else {
$buf=$ENV{'QUERY_STRING'};
}
if ($buf eq "") {
return 0 ;
}
else {
@fval=split(/&/,$buf);
foreach $i (0 .. $#fval){
($name,$val)=split (/=/,$fval[$i],2);
$val=~tr/+/ /;
$val=~ s/%(..)/pack("c",hex($1))/ge;
$name=~tr/+/ /;
$name=~ s/%(..)/pack("c",hex($1))/ge;
if (!defined($field{$name})) {
$field{$name}=$val;
}
else {
$field{$name} .= ",$val";
#if you want multi-selects to goto into an array change to:
#$field{$name} .= "\0$val";
}
}
}
return 1;
}
# ***ENDAUTOGEN:PARSE*** Do NOT modify this line!! You may enter custom
code after this line.
**************************************
------------------------------
Date: Thu, 08 Apr 1999 18:57:49 GMT
From: dturley@binary.net (David Turley)
Subject: Re: Help! Script works in Linux-dies in Windows
Message-Id: <370cfb76.27472946@news.erols.com>
On Thu, 08 Apr 1999 14:17:58 -0400, Ramkumar Kashyap
<kashyap@libertynet.org> wrote:
[Courtesy copy to Ramkumar Kashyap.]
>It runs fine on Linux, but I tried running it from the command line in
>win95 and get the "die" message.
>#!/usr/local/bin/perl
> $mail_prog = '/usr/lib/sendmail' ;
HINT 1 -> ^^^^^^^^^^^^^^
HINT 2 -> I bet there is no /usr/lib/sendmail on your win95 machine.
HINT 3 -> You can't call a program that does not exist.
You take it from here.
--
David Turley
dturley@pobox.com
http://www.binary.net/dturley/
------------------------------
Date: Thu, 8 Apr 1999 11:34:27 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: HELP!! ON STRING COMPARING
Message-Id: <MPG.11769690ca55e2ae98986d@nntp.hpl.hp.com>
[Posted and a courtesy copy mailed.]
In article <370CE7C7.3AEC6384@giss.nasa.gov> on Thu, 08 Apr 1999
13:30:47 -0400, Jay Glascoe <jglascoe@giss.nasa.gov> says...
...
> # and, if you want to remove those weird characters
> my %hash;
> @hash{ map { tr/\B\b\n\r\t \0//d }, @filter_a } = ();
> my $matched = exists $hash{$linkname};
Three problems here, in one line of code. Somehow you forgot to test
before posting.
Huge problem: This doesn't compile, because of the superfluous comma.
Big problem: tr/...//d returns the number of characters deleted, which
is *not* what you want to use as the hash key.
Small problem: \B means nothing different from B in the tr/// operand.
@hash{ map { tr/\b\n\r\t \0//d; $_ } @filter_a } = ();
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Thu, 08 Apr 1999 15:00:42 -0400
From: Jay Glascoe <jglascoe@giss.nasa.gov>
To: Larry Rosler <lr@hpl.hp.com>, lufan@hotmail.com
Subject: Re: HELP!! ON STRING COMPARING
Message-Id: <370CFCDA.24B2DDDB@giss.nasa.gov>
[courtesy copy of post sent to Larry and Lufan]
Larry Rosler wrote:
>
> Huge problem: This doesn't compile, because of the superfluous comma.
<snip more prob's>
oops! Yes, I failed to test that line. Sorry, Lufan.
Jay Glascoe
--
"The number of UNIX installations has grown to 10, with more expected."
-- _The UNIX Programmer's Manual_, Second Edition, June, 1972.
------------------------------
Date: Thu, 08 Apr 1999 19:20:11 GMT
From: Brian Lavender <blavender@spk.usace.army.mil>
Subject: How do I send an email attachment with sendmail pipe
Message-Id: <7eivgs$snv$1@nnrp1.dejanews.com>
I have the following code which pipes into sendmail. How do I include an
attachment?
#!/usr/bin/perl
$mailprog = '/usr/lib/sendmail';
open (MAILOWNER, "|$mailprog -t") || die "Unable to open sendmail";
print MAILOWNER "To: brian\@brie.com \n";
print MAILOWNER "From: brian\@brie.com \n";
print MAILOWNER "Subject: Your requested file!\n\n";
print MAILOWNER "Here is the file you requested.\n";
close (MAILOWNER);
---------------------
Brian E. Lavender
US Army Corps of Engineers -- Programmer / Systems Analyst
Sacramento, CA (916) 557-6623
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 08 Apr 1999 14:22:45 -0400
From: Jay Rogers <jay@rgrs.com>
Subject: Re: How to close all file descriptors ?
Message-Id: <82n20j55vu.fsf@shell2.shore.net>
gellyfish@gellyfish.com (Jonathan Stowe) writes:
> On Thu, 08 Apr 1999 14:44:22 GMT, raymondj@removethis.raleigh.ibm.com
> (RJ) wrote:
>
> >On 7 Apr 1999 22:08:51 GMT, abigail@fnx.com (Abigail) wrote:
> >
> >Reread the original question.
> >You can not exit and then fork a new process!
> >
> >>RJ (raymondj@removethis.raleigh.ibm.com) wrote on MMXLV September
> >>MCMXCIII in <URL:news:370cc7b1.24538875@mdnews.btv.ibm.com>:
> >>^^
> >>^^ Question: How in perl can you close all file handles?
> >>
> >>
> >>exit;
> >>
> >>
> >>
>
> I think *you* ought to reread the original question and *then* as a
> supplementary bonus read the documentation. exiting the program is
> the only way to close all open filehandles without knowing the name of
> each one and doing close() on each one individually.
That's simply not true.
So there's no confusion, here's the original poster's question
that Abigail snipped:
raymondj@removethis.raleigh.ibm.com (RJ) writes:
> Question: How in perl can you close all file handles? (or even a
> particular one without having a perl FILEHANDLE reference.
You can close files by file descriptor.
This will close all fd's except for 0, 1, and 2 - which should be
stdin, stdout, and stderr. It also shows you how to check if an
fd is open.
use POSIX qw(close fstat sysconf _SC_OPEN_MAX);
$max_fd = sysconf(_SC_OPEN_MAX) - 1;
for ($fd = 3; $fd <= $max_fd; $fd++) {
if (fstat $fd) { # fd is open
POSIX::close $fd;
}
}
Note that when you open a file with perl, the close-on-exec flag
is set, except of course for stdin, stdout, stderr. $^F can be
used to change this.
--
Jay Rogers
jay@rgrs.com
------------------------------
Date: Thu, 08 Apr 1999 18:41:45 GMT
From: raymondj@raleigh.ibm.com (RJ)
Subject: Re: How to close all file descriptors ?
Message-Id: <370df729.14505484@mdnews.btv.ibm.com>
On 08 Apr 1999 14:22:45 -0400, Jay Rogers <jay@rgrs.com> wrote:
Jay, thanks for your help. However your last comment:
>Note that when you open a file with perl, the close-on-exec flag
>is set, except of course for stdin, stdout, stderr. $^F can be
>used to change this.
If this were true, then when my CGI forks and then exec's the new
process it should not have file descriptor 7 open. Unless... the web
server was opening it, clearing the close-on-exec bit, forks off the
CGI and when the CGI exec'd the new process the bit was still set.
raymondj@removethis.raleigh.ibm.com
------------------------------
Date: Thu, 08 Apr 1999 11:15:01 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: How to pass parameters for perl programs under ActivePerl?
Message-Id: <370CF225.7DA93CB2@mail.cor.epa.gov>
agniora@usa.net wrote:
>
> I am using ActivePerl on WinNT platform. But everytime i have to run a script
> i have to type perl myprog.pl but i need to pass some parameters to my
> program, adding parameters to the above line doesnt work cause it gets taken
> as an argument to the perl program not myprog.pl does anyone know any
> workaround to this?
>
> thanks
> Nayeem (agniora)
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Are you using build 509 or 513? If so, and it doesn't work right, read
the
win32 Perl docs that came with the installation. Under either
'Win95/NT'
or 'Quirks' there are instructions on how to solve this. I can't be
more
specific at the moment, because right now my wintel box is open for
installing more hardware.
David
--
David Cassell, OAO
cassell@mail.cor.epa.gov
Senior Computing Specialist phone: (541)
754-4468
mathematical statistician fax: (541)
754-4716
------------------------------
Date: Thu, 8 Apr 1999 20:58:47 +0200
From: "GNF" <tutorrials@wanadoo.fr>
Subject: Making logs
Message-Id: <7eiugn$ijn$1@wanadoo.fr>
I have protected a directory with .htaccess and .passwd files and i wish to
get the combination Username/Password in a perl script but i did'nt found
how to. Does anybody knows if it's possible ?
Thanks
------------------------------
Date: Thu, 08 Apr 1999 14:01:57 -0400
From: Jay Glascoe <jglascoe@giss.nasa.gov>
To: kanajan@brown.edu
Subject: Re: matching non-ordered string
Message-Id: <370CEF15.3ACC7684@giss.nasa.gov>
kanajan@brown.edu wrote:
>
[courtesy copy of post sent to cited author]
> ^Entry: (.*(b_r)&.*(b_g))|(.*(b_g)&.*(b_r))
> but I feel this is ugly. Is there a nicer way of doing this regex.
this is ugly too, but probably quickest:
print "match" if $s =~ m/^Entry: /
&&
($s =~ m/b_r.*?b_g/
||
$s =~ m/b_g.*?b_r/);
Jay Glascoe
------------------------------
Date: Thu, 08 Apr 1999 14:05:33 -0400
From: Jay Glascoe <jglascoe@giss.nasa.gov>
To: kanajan@brown.edu
Subject: Re: matching non-ordered string
Message-Id: <370CEFED.987E0F45@giss.nasa.gov>
kanajan@brown.edu wrote:
>
> Hi,
foreach ($s) {
/^Entry: / or last;
/b_r.*?b_g/ or /b_g.*?b_r/ or last;
print "matched!\n";
}
--
"Don't be too proud of this technological
terror you've constructed."
-- Darth Vader
------------------------------
Date: Thu, 08 Apr 1999 14:50:28 -0400
From: Liam Whalen <liam@hurontel.on.ca>
Subject: POP3 pearl script.
Message-Id: <370CFA73.73DBE81C@hurontel.on.ca>
This may be the wrong group but from the looks of everything here I
think it is the right place. Fisrt off I am looking for a script that
will open a POP3 connection to our mail server and return a list of the
messages. Basically a hotmail for an ISP so customers can check there
email almost anywhere. If anyone could point me to some sites that have
some scripts I can search through please do. If no one knows of any
script sites can someone tell me if this is possible to do in pearl?
Thanks
Liam
------------------------------
Date: Thu, 08 Apr 1999 19:10:03 GMT
From: dturley@binary.net (David Turley)
Subject: Re: POP3 pearl script.
Message-Id: <370cfe73.28238221@news.erols.com>
On Thu, 08 Apr 1999 14:50:28 -0400, Liam Whalen <liam@hurontel.on.ca>
wrote:
> If no one knows of any
>script sites can someone tell me if this is possible to do in pearl?
You could search www.perl.com and look at the long list that comes up.
Oops, I mis-read your post, you wanted pearl script. Try
alt.programming.seafood
--
David Turley
dturley@pobox.com
http://www.binary.net/dturley/
------------------------------
Date: Thu, 8 Apr 1999 13:31:32 -0600
From: "Eric Arnold" <nospam_earnold@requisite.com>
Subject: Re: Quantum Variable
Message-Id: <7ej06e$523$1@news1.rmi.net>
print all your vars and pipe the output to "od -c"
erica@coffin.org wrote in message <7egndh$u7l$1@nnrp1.dejanews.com>...
>I believe I have found the infamous "Quantum String". I will worship for
life
>anyone who can help me force its behaviour into a single state.
------------------------------
Date: Thu, 08 Apr 1999 11:35:59 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: system-command under Win98
Message-Id: <370CF70F.C477C724@mail.cor.epa.gov>
Matti Johannes Kdrki wrote:
>
> What is wrong with ActivePerl? I'm trying start a program with following
> command:
>
> system('start index.html');
>
> That command starts Internet Explorer and loads the index.html file.
>
> But there is some strange delay between calling that system command and
> starting the Explorer. My perl script stops for about ten seconds and it
> seems that the Perl interpreter is doing nothing. What is causing that
> delay? And how can I get rid of it?
>
> Thanks in advance for all help. This 'feature' is very annoying.
Yes, I can believe that. The feature is not in Perl but in your system.
You shouldn't be seeing a noticeable difference in time. How many megs
of
RAM memory do oyu have on your system? There could be any number of
causes, but one possibility I have seen before is using enough RAM that
the system has to do some swapping to disk first before opening the next
program. And writing to disk is of course a big bottleneck.
> --
>
> Matti J. Kdrki
HTH,
David
--
David Cassell, OAO
cassell@mail.cor.epa.gov
Senior Computing Specialist phone: (541)
754-4468
mathematical statistician fax: (541)
754-4716
------------------------------
Date: Thu, 08 Apr 1999 11:24:26 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Thread renamed to: where to find perl programming tools
Message-Id: <370CF45A.539DC3EB@mail.cor.epa.gov>
lvirden@cas.org wrote:
>
> Courtesy Cc to author as requested...
>
> According to Jin Shunyao <jinsy@iname.com>:
> :Does there have any tool that can manage perl source code like cscope
> :for language C?
>
> Unfortunately, your subject line is going to generate a series of answers
> quite irrelevant to your request. So if you don't mind, I replaced it
> in hopes that someone might actually read this article and answer the question
> you asked rather than the question they think you asked...
Usability is always good.
> For the 3 or so people who end up reading this, the cscope mentioned by
> Jin is a Unix tool (that ships with Solaris) that provides a curses interface
> to a ctags like database. In the database are all the references to all the
> variables, procedures, included files, etc. the user wishes to 'browse'.
> Cscope then allows one to type in a name and will show the user where the
> name appears in the source code tagged. The user then gets a chance to
> 'scroll' through the references and have cscope drop you into an editor
> to see the line in context. The user can do 'replace this name with a
> second name' and selectively apply the replace. The user can search for
> 'strings' as well (for cases where one wants to change comments, or just
> see where a word is documented, used in quotes, etc.).
In perlfaq3, there is "Is there a ctags for Perl?"
It refers the reader to a 'simple' one [the author's words, not mine]
at http://www.perl.com/CPAN/authors/id/TOMC/scripts/ptags.gz
Naturally, it is in CPAN. The one-stop-shopping-center-for-all-your-
Perl-needs place to go. Forget that Ace Hardware guy. :-)
> cscope is NOT an IDE in the sense that normally sends unix perl programmers
> into spasms. Instead, think of it as a source code browser.
>
> In theory, a perl script could generate a file in the format expected by
> cscope and cscope could then be used to browse...
>
> --
> <URL: mailto:lvirden@cas.org> Quote: Saving the world before bedtime.
> <*> O- <URL: http://www.purl.org/NET/lvirden/>
> Unless explicitly stated to the contrary, nothing in this posting
> should be construed as representing my employer's opinions.
BTW, great quote. I wonder if anyone else reading this will know
the attribution. "Not the meat ray!"
David
--
David Cassell, OAO
cassell@mail.cor.epa.gov
Senior Computing Specialist phone: (541)
754-4468
mathematical statistician fax: (541)
754-4716
------------------------------
Date: 08 Apr 1999 15:14:58 -0400
From: Uri Guttman <uri@home.sysarch.com>
Subject: translate is its name (was Re: =~tr / / /; problem)
Message-Id: <x7zp4isz4d.fsf_-_@home.sysarch.com>
>>>>> "DC" == David Cassell <cassell@mail.cor.epa.gov> writes:
DC> Larry Rosler wrote:
>> I hate to disagree with my respected co-author, but you've got this
>> wrong. Either that, or so do I and so do the authors of the Perl docs.
yes to the latter.
DC> Technically, I would have to side with Uri on this. I quote the
DC> definition of transliterate from Webster's: "to represent or spell in
DC> the characters of *another* alphabet." [emphasis mine]
>> This is from perlop:
>>
>> tr{}{} Transliteration
>>
>> and similarly for the entries in perlfunc:
>>
>> tr///
>> The transliteration operator. Same as y///. See perlop.
DC> True, but I quote here from the SunOs and Slowlaris manpages:
DC> tr(1) User Commands tr(1)
DC> NAME
DC> tr - translate characters
blue camel has the translation operator in the index. perl5 desktop says
it 'translates' chars. i would say that the perlop page has a BUG in
its use of the word transliteration. as i read in the dictionary (and
david quotes above) transliteration needs different alphabets.
translation of characters is within the same alphabet.
PL/I had the translate function (same op as perl). VAX assembly had the
same name for its op.
i think this is worthy of a report to p5p. the name is definitely
translate and larry (the original one) should make the final call. as he
is a linguist he should know.
i never heard of a transliteration op in any computer language! maybe a
multilingual version of soundex could do it! :-)
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: 8 Apr 1999 18:46:51 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Verifying existance of a file
Message-Id: <slrn7gpuhn.ofg.fl_aggie@stat.fsu.edu>
On 08 Apr 1999 08:49:20 -0700, Randal L. Schwartz
<merlyn@stonehenge.com>, in <<m1n20j15a7.fsf@halfdome.holdit.com>> wrote:
+ >>>>> "Ophir" == Ophir Marko <ophir@saifun.com> writes:
+
+ Ophir> How can i verify that a file exists?
+
+ Perhaps you want alt.philosophy.existential?
If a file exists in a forest, and a tree falls on it, does it make a
noise?
James
------------------------------
Date: 8 Apr 1999 18:55:36 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Verifying existance of a file
Message-Id: <slrn7gpv24.ofg.fl_aggie@stat.fsu.edu>
On Thu, 08 Apr 1999 16:52:46 GMT, Bart Lateur
<bart.lateur@skynet.be>, in <<370cdd65.890004@news.skynet.be>> wrote:
+ Actually, "perldoc -f -X" works too. But you have to know a bit of Perl
+ already before you'd even *think* of trying that.
I just memorized the page in the Blue Camel -- 85, I think.
+ You can always load "perlfunc.pod" into a text editor, and look up the
+ phrase "file exist". It will reveal this line:
I think there is an add-on, yes...perlindex
NAME
perlindex - index and query perl manual pages
SYNOPSIS
perlindex -index
perlindex tell me where the flowers are
I have to install that on my new system. Rather useful.
+ Still, I'm pondering on how to improve perldoc. How do you search stuff
+ when you don't know *exactly* what you're looking for? "grep" kinda
+ works, but isn't really in line with the rest of perldoc. "perldoc -g"?
perlindex is a way to do this. And while it does score the results, often
what I want is lower down on the list. And it can be confusing to the
less-experienced.
James
------------------------------
Date: Thu, 08 Apr 1999 12:01:52 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: zipped perlman
Message-Id: <370CFD20.A58E9ACE@mail.cor.epa.gov>
Jeff Thies wrote:
>
> I'm a windows user and would like to have the perl man local. Is there
> a zipped version? I can find the tarred version.
>
> Jeff
Jeff, a couple points.
[1] Using WinZip I had no trouble untarring. Try that and see if it
works.
[2] If you have a recent ActiveState build on your winbox, it should
have
been installed with all the docs already there. Is there an icon in
your
Start menu which lets you open up the ActiveState Perl documentation in
your browser? There should be. For some people, this is handier than
using 'man'. Or perldoc, for wintel boxes.
HTH,
David
--
David Cassell, OAO
cassell@mail.cor.epa.gov
Senior Computing Specialist phone: (541)
754-4468
mathematical statistician fax: (541)
754-4716
------------------------------
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 5332
**************************************