[10275] in Perl-Users-Digest
Perl-Users Digest, Issue: 3868 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Oct 1 18:07:56 1998
Date: Thu, 1 Oct 98 15:00:25 -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, 1 Oct 1998 Volume: 8 Number: 3868
Today's topics:
Re: Accessing java classes from perl. (Brian Jepson)
Append to users file with .htaccess <rob@ccsn.com>
Re: Binary data in sockets (I R A Aggie)
Re: bug in Berkley DB/DB_File? leonardlinde@my-dejanews.com
Can perl help me? <cdague@bigcat.fhsu.edu>
Cannot execute perl scripts in Home directory sachin_gang@my-dejanews.com
Re: Cannot execute perl scripts in Home directory <eashton@bbnplanet.com>
checking for errors on close()? <james.davis@corp.home.net>
Re: Checking FS (File system) <jltaylo@sandia.gov>
Re: Checking FS (File system) <Ian_Lowe@fanniemae.com>
Delete file command? <mpolakow@emergemarketing.com>
Re: Delete file command? (Larry Rosler)
Re: Difference between =~ and =* operators? (Ilya Zakharevich)
Re: Email parser <jdubois@keane.com>
how to pass FORM variable to second cgi? (Shambo Pfaff)
Re: IDE for Perl <jerrware@mwis.net>
Re: IDE for Perl (Ilya Zakharevich)
Re: Ignore multiple input record seperators (Larry Rosler)
Image tag script pull darreneswap@my-dejanews.com
Is Net::FTP (libnet-1.0605) threadsafe? <ct@NOSPAMcthompson.org>
Re: Is Net::FTP (libnet-1.0605) threadsafe? <ct@NOSPAMcthompson.org>
linking perl modules to C joost@dt.net
Re: Need IP Address Sort Subroutine droby@copyright.com
Re: passing javascript vars to CGI <phinneas@eskimo.com>
Re: Problem installing Tk.pm, help/guidance please <lusol@Pandora.CC.Lehigh.EDU>
Searching for a string <miller@bigsky.net>
Re: Searching for a string (David A. Black)
Re: Searching for a string (Larry Rosler)
SSI call darrensw@netscape.net
trapping die in Perl debugger? <kin@omni.c-cube.com>
Re: trapping die in Perl debugger? (Ilya Zakharevich)
URL not working in Eudora via perl script webmaster@vaticanart.com
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 1 Oct 1998 21:37:51 GMT
From: bjepson@ids.net (Brian Jepson)
Subject: Re: Accessing java classes from perl.
Message-Id: <slrn717tkc.3ja.bjepson@gelvis.ids.net>
On Wed, 30 Sep 1998 22:47:59 -0500, Deva Seetharam <psdspss@execpc.com> wrote:
>I want to access java classes from a perl program.
>Is it possible to do that ?
>If yes , please advise me how to do this ?
>
>Larry Wall mentioned in his interview to Dr.Dobbs Journal(02/1998) about
>a hybrid
>lang called JPL.
>There is not much information in that issue.
>
JPL is included with the Unix Perl Resource Kit, but will soon be released
under an open source license. There is a mailing list to discuss JPL -
send a message with the word SUBSCRIBE in the body or the subject to
jpl-users-request@as220.org.
--
Brian Jepson * (bjepson@ids.net) * http://users.ids.net/~bjepson
Choosy mothers choose to chew Chew-Z
------------------------------
Date: Thu, 1 Oct 1998 16:42:21 -0500
From: "Roberto Cerini" <rob@ccsn.com>
Subject: Append to users file with .htaccess
Message-Id: <6v0t1j$8fa@nnrp2.farm.idt.net>
Hello,
I really no VERY VERY little about perl. I am trying to come up wit a way
that a user can enter a userid and a password into an html form and those
are taken and added to the user file that is created by htpasswd. I know
the password has to be encrypted and the userid and password have to be
appended to the user file. I am completely clueless.
Help, please,
Regards,
--
Roberto Cerini
rob@ccsn.com
------------------------------
Date: Thu, 01 Oct 1998 10:47:06 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Binary data in sockets
Message-Id: <fl_aggie-0110981047070001@aggie.coaps.fsu.edu>
In article <6uvqrj$73j$1@nnrp1.dejanews.com>, joumdane3@my-dejanews.com wrote:
+ Hello,
+ I'm trying to write an ftp program
Net::FTP. Example:
use Net::FTP;
$ftp = Net::FTP->new("some.host.name");
$ftp->login("anonymous","me@here.there");
$ftp->cwd("/pub");
$ftp->get("that.file");
$ftp->quit;
James
------------------------------
Date: Thu, 01 Oct 1998 21:20:10 GMT
From: leonardlinde@my-dejanews.com
Subject: Re: bug in Berkley DB/DB_File?
Message-Id: <6v0rm9$omd$1@nnrp1.dejanews.com>
I had the same experience with my RH 5.0 box and DB_File. However, the same
code works fine on a FreeBSD box, so I assume the problem is somewhere
in the Linux implementation of Berkeley DB. I'll be investigating this
further and will post if I find a fix.
Leonard Linde
llinde (at) pinnsoft.com
In article <6uthc7$iku$1@nnrp1.dejanews.com>,
hazard@my-dejanews.com wrote:
> Hi.
>
> I had a small program which accounted all received mail in Berkley DB
> database hash. Everything worked fine until now, I get a segmentation fault
> after scanning about a half of the databse. If I do %keys , I get a
> segmentation fault immediately. The base wasnt corrupted.
>
> I copied the base and tried it on a RH5.0 glibc box - with the same results as
> on the RH4.2 with berkley db 1.85.
>
> Can anyone help me debug the problem? Or it's a problem with perl DB_File
> module/berkley db? I runned it with perl -d and it segfaults in Carp.pm:
> DB_File::NEXTKEY(/usr/lib/perl5/Carp.pm:94):
> 94: $$msg
>
> I can give anyone interested a copy of the test perl script which reproduces
> segfault and copy of the base itself. Please, CC your answers to
> hazard.bsn(at)maks.net
>
> Vladimir
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 01 Oct 1998 15:59:37 -0500
From: Chad <cdague@bigcat.fhsu.edu>
Subject: Can perl help me?
Message-Id: <3613ED39.4D689943@bigcat.fhsu.edu>
Hi, and thanks in advance for any advice.
Here is my situation. I have applications and data on a mainframe
that I need to get to users through the web. There is a web server on
the mainframe that can do this very easily. But, this web server does
not support SSL, which is a requirement for my project. So, I was
wondering if it is possible to write a perl cgi on a Unix-SSL-web-server
that would act as a link between the SSL server and the mainframe's
server.
So, in essence, the user would send a request to the SSL web server, a
cgi would contact the mainframe web server, the mainframe web server
would send a response to the cgi, and the cgi would send the response
back to the user's browser through the SSL. And all of this would be
transparent to the end user's browser, it would think it was getting
everything from the SSL web server.
Or, if this will not work does anyone know of a product that you can sit
in front of any web server and make it SSL?
Any ideas/help would be greatly appreciated!
CHAD
------------------------------
Date: Thu, 01 Oct 1998 20:31:58 GMT
From: sachin_gang@my-dejanews.com
Subject: Cannot execute perl scripts in Home directory
Message-Id: <6v0orv$kq3$1@nnrp1.dejanews.com>
Hello
I have installed perl 5.005_02 on SunOS4.1.3 machine, under my home directory
(~/local/perl). I have changed my $path setting, so that my local version
precedes the older /usr/local/bin/perl (5.001). The scripts run fine, if I
invoke with the perl interpreter, at the command line:
%perl login.pl (works).
But, if I rely on the shebang (!#/people/sachin/local/bin/perl), with the
execute permission on for the script, I cannot run it: Permission Denied.
%login.pl (and ./login.pl) returns a Permission Denied (file and dir
permissions are set right).
This effects my CGI scripts too (Premature End of script headers). Anything
that I am missing here? The Perl install went fine and I poured over all of
the manuals/FAQs available.
The only other suspicion I have is on my home directory. it is NFS mounted
from a different machine.
Thank you
-sachin
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Thu, 01 Oct 1998 21:16:48 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: Cannot execute perl scripts in Home directory
Message-Id: <3613EECC.F236B5AD@bbnplanet.com>
sachin_gang@my-dejanews.com wrote:
> But, if I rely on the shebang (!#/people/sachin/local/bin/perl), with the
> execute permission on for the script, I cannot run it: Permission Denied.
If that isn't a typo it should be #!.
One way to start troubleshooting is "truss login.pl". See what it is
trying to open when it barfs.
> The only other suspicion I have is on my home directory. it is NFS mounted
> from a different machine.
Oh, ick, ow. Well, try this. Copy the script to /tmp and try running it
from there. It is doubtful that this has anything to do with NFS.
e.
Would I live my life over again?
Make the same unforgivable mistakes?
Yes, given half a chance. Yes -R. Carver-
------------------------------
Date: Thu, 01 Oct 1998 19:34:22 GMT
From: James Davis <james.davis@corp.home.net>
Subject: checking for errors on close()?
Message-Id: <3613D93D.9DECACA9@corp.home.net>
I understand that a close() call on a pipe should put exit & status in
16-bit $? - program as follows:
open (OUTPUT,
"| \(/usr/local/bin/rsh -l $remoteuser $remoteserver \"cat - \>
$remotedir/$filename\"\)");
print OUTPUT ("data");
close (OUTPUT);
close() now returns $? as "FF00" instead of had-been-receiving "0000".
Remote file gets created in both causes.. is there any place to check
for why "FF"?
Thanks,
--
James Davis
james.davis@corp.home.net
------------------------------
Date: Thu, 01 Oct 1998 13:26:47 -0600
From: "Jeffrey L. Taylor" <jltaylo@sandia.gov>
To: Patrick <pgh@ga.nl>
Subject: Re: Checking FS (File system)
Message-Id: <3613D776.243676CA@sandia.gov>
Pat:
This is more then you asked for but it is what we use. It will send a
page to an alpha-numeric pager and send email.
Make sure you change the email ids, the pageer number and the
/dev/dsk/xxxx for the root and cdrom. And set the LIMIT=95 to whatever
limit you want to be notified at.
Hope this helps.
Jeff Taylor
#!/bin/ksh
# SHELL SCRIPT TO CHECK FOR FILE SYSTEMS ABOUT TO RUN OUT OF SPACE
# run by cron each night
#
# script name: /usr/util/flszchk.sh
# Added alpha pager capabilities
# Cut "ora" oracle database filesystems from checks
#
##############################################################################
# Execute the appropriate version of df for the machine (HP, SUN, SGI,
IBM)
# being looked at to get filesystem utilization information.
# Strip off df report header with grep.
# Depending on what machine type we are looking at, pull out percent
# utilized and filesystem name from df output.
# Read in a generic version of df output that was created and
# check for any filesystems where percent utilized is over the
# limit threshold.
# Notify system administrators by mail if any filesystems over the limit
##############################################################################
##############################################################################
#
#########################################
# MAILING LIST for problem notification #
#########################################
SYS_ADMIN="bozo@anwhere.gov \
gooofy@ca.gov"
PAGER_EMAIL="505xxxxxxx.xxxxxx@pagenet.net"
CDROM="/dev/dsk/c1t2d0" # cdrom dev always 100% full - exclude from rpt
# Must put value in CDROM before running script
#
ROOT="/dev/dsk/c0t6d0" # the root disk
integer pct_num LIMIT
LIMIT=95
FULL_FILE="0" # send mail if set to
1 #
########################################
# DETERMINE MACHINE TYPE AND NODE NAME #
########################################
NODE=`uname -n`
OS=`uname -s`
cd /tmp
################################################
# Execute version of df appropriate to each OS #
# and convert output to a generic format #
################################################
case $OS in
IRIX)
df > df.out # save for mailing
out #
cat df.out | grep -v 'Filesystem' > df.noh # get rid of rept
header #
cat df.noh | tr -s " " | cut -d" " -f1 > dev # extract dev name
#
cat df.noh | tr -s " " | cut -d" " -f6 > pct # extract pct
utilized #
cat df.noh | tr -s " " | cut -d" " -f7 > fs # extract file sys mt
pt #
paste dev pct fs > df.generic;;
HP-UX)
bdf -l > df.out # save for mailing
out #
cat df.out | grep -v 'ora' > df.noora # get rid of ora
filesyss #
cat df.noora | grep -v 'Filesystem' > df.noh # get rid of rept
header #
cat df.noh | tr -s " " | cut -d" " -f1 > dev # extract dev name
#
cat df.noh | tr -s " " | cut -d" " -f5 > pct # extract pct
utilized #
cat df.noh | tr -s " " | cut -d" " -f6 > fs # extract file sys mt
pt #
paste dev pct fs > df.generic;;
SunOS)
df -k > df.out # save for mailing
out #
cat df.out | grep -v 'ora' > df.noora # get rid of ora
filesyss #
cat df.noora | grep -v 'Filesystem' > df.noh # get rid of rept
header #
cat df.noh | tr -s " " | cut -d" " -f1 > dev # extract dev name
#
cat df.noh | tr -s " " | cut -d" " -f5 > pct # extract pct
utilized #
cat df.noh | tr -s " " | cut -d" " -f6 > fs # extract file sys mt
pt #
paste dev pct fs > df.generic;;
AIX)
df > df.out # save for mailing
out #
cat df.out | grep -v 'Filesystem' > df.noh # get rid of rept
header #
cat df.noh | tr -s " " | cut -d" " -f1 > dev # extract dev name
#
cat df.noh | tr -s " " | cut -d" " -f6 > pct # extract pct
utilized #
cat df.noh | tr -s " " | cut -d" " -f7 > fs # extract file sys mt
pt #
paste dev pct fs > df.generic;;
*)
echo "unable to determine machine type. Terminating" > df.out
exit 1;;
esac
echo "" > full_files # clear out old file list #
#####################################
while read devnm pct_util mnt_pt # read in OS independent generic fl #
do #####################################
pct_num=${pct_util%?} # get rid of % on right and use as
int #
if (($pct_num > $LIMIT)) # Is disk filesystem over LIMIT
value? #
# If so, notify SYS_ADMIN list by
mail #
then
########################################
if [[ $devnm != $CDROM ]] # BUT, not if it is cdrom #
then
echo "$NODE ==> $mnt_pt filesystem is $pct_util full"
\
>> full_files
FULL_FILE="1" # ==> set flag to send mail
fi
fi
done < df.generic # <<===== End of read loop for generic df file
if [[ $FULL_FILE = "1" ]] ######################################
then # send mail if FULL_FILE flag got #
cat full_files >> df.out # set to 1 during processing. Tack #
mail $SYS_ADMIN < df.out # list of files over limit to df.out #
fi ######################################
#####################################
while read devnm pct_util mnt_pt # read in OS independent generic fl #
do #####################################
pct_num=${pct_util%?} # get rid of % on right and use as
int #
if (($pct_num > $LIMIT)) # Is disk filesystem over LIMIT
value? #
# If so, notify PAGER_EMAIL list by
mail #
then
########################################
if [[ $devnm = $ROOT ]] # If it is root #
then
echo "$NODE ==> $mnt_pt filesystem is $pct_util full"
\
>> full_files
FULL_FILE="1" # ==> set flag to send mail
fi
fi
done < df.generic # <<===== End of read loop for generic df file
if [[ $FULL_FILE = "1" ]] ######################################
then # send page if FULL_FILE flag got #
# set to 1 during processing. Tack #
mail $PAGER_EMAIL < full_files # list of files over limit. #
fi ######################################
exit 0
Patrick wrote:
>
> Hi,
>
> Does anyone have a script that will check the FS, and when it's > 80%
> full, write a message or display something on the console or any
> terminal.
>
> I've heard this can be done in a awk script, perl script or tcl/tk
> script. Can anyone mail this to me.
>
> Thank, Patrick.
> e-mail: pgh@ga.nl
--
Jeff Taylor
voice: (505) 845-3567, pager: (505) 845-0142 id#: 4066, fax: (505)
844-8335
MS: 0805, Bldg: 880, Rm: D2H2, Dept 4911
email:jltaylo@sandia.gov
------------------------------
Date: Thu, 01 Oct 1998 16:46:35 -0400
From: Ian Lowe <Ian_Lowe@fanniemae.com>
Subject: Re: Checking FS (File system)
Message-Id: <3613EA2B.8ACFDD32@fanniemae.com>
Let me get everyone's opinion on a more complex filesystem monitor. We
use Tivoli in our large Sun environment. We currently have a filesystem
monitor in place, but it is very static, and doesn't take into account
the varying size of our filesystems. For instance, if a filesystem was
300 MB, we might want an alert at 90% capacity, whereas a 90% capacity
on a 15 GB filesystem would be be way too low to warrant a critical
event.
I am new to Perl, but would like to get some advice on how to use hashes
to build a table that could dynamically look at total filesystem size,
current capacity, and what application group owns the filesystem (so the
alert could be sent to the right folks). I know it can be done in Perl,
I'm just trying to get started in the right direction.
The table would have values something like this:
SIZE WARNING CRITICAL
300 - 600MB 80% (60-120MB) 90% (30-60MB)
600MB - 5GB 90% (60-500MB) 95% (30-250MB)
5GB - 10GB 95% (250-500MB) 97% (150-300MB)
10GB - 20GB 95% (500-1000MB) 98% (200-400MB)
> 20GB 97% (600MB+) 99% (200MB+)
Any thoughts?
Ian
Patrick wrote:
>
> Hi,
>
> Does anyone have a script that will check the FS, and when it's > 80%
> full, write a message or display something on the console or any
> terminal.
>
> I've heard this can be done in a awk script, perl script or tcl/tk
> script. Can anyone mail this to me.
>
> Thank, Patrick.
> e-mail: pgh@ga.nl
------------------------------
Date: Thu, 1 Oct 1998 16:25:16 -0400
From: "Mark Polakow" <mpolakow@emergemarketing.com>
Subject: Delete file command?
Message-Id: <6v0oq8$3dl$1@strato.ultra.net>
What is the Perl/Unix command to delete a file.
Win32 uses unlink($path);
but this doesn't seem to work on Unix. Do the file permissions have to be
set a certain way?
Much thanks in advance...
------------------------------
Date: Thu, 1 Oct 1998 14:07:46 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Delete file command?
Message-Id: <MPG.107d8efd2550f1559897d2@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and a copy mailed.]
In article <6v0oq8$3dl$1@strato.ultra.net> on Thu, 1 Oct 1998 16:25:16 -
0400, Mark Polakow <mpolakow@emergemarketing.com> says...
> What is the Perl/Unix command to delete a file.
> Win32 uses unlink($path);
> but this doesn't seem to work on Unix. Do the file permissions have to be
> set a certain way?
The *directory* permissions have to be set so that the userid of the
program has read/wrie permission.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 1 Oct 1998 20:05:29 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Difference between =~ and =* operators?
Message-Id: <6v0na9$4g6$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to Erik Huelsmann
<f.w.h.hulsmann@rcondw.rug.nl>],
who wrote in article <wzgSQd1pdrdd-pn2-WcJVqr4Zt48h@localhost>:
>
> I am fairly new to perl, but I have extensively read the perlop pod
> and have not come to a conclusion about most of the regex operators.
> What are the differences?
>
> More specificly: what is the difference between the =~ operator and
> the =* operator? Both are said to influence the behavior of the s///
> operator, but how?
The difference is quite obvious: one exists, another does not.
Hope this helps,
Ilya
------------------------------
Date: Thu, 01 Oct 1998 17:03:30 -0400
From: Joseph DuBois <jdubois@keane.com>
Subject: Re: Email parser
Message-Id: <3613EE22.CCC7A0C3@keane.com>
Phil C wrote:
> Is there a way ot read Emails from a perl script and parse its
> informations. I'm trying to filter automatically some of my incoming
> Emails like a UNIX tool called "Filter" used to do.
> Does anyone know where I can get access to such a script?
You can just add a ".forward" to file to the account you are sending
the emails to, then put a line in it to call your perl script. It will
then
parse the email. (You read from stdin). I have included the basic script
below. You do need to know the format of the email, but that should
be easy. In the .forward file I believe it goes like this "\userid, "|
/path/script.pl"
We use the script to parse out resumes and add them to another
program.
-------------------------------------------------------
Joseph DuBois (Internet/Intranet Specialist)
mailto:jdubois@keane.com (Work) http://www.keane.com/
#!/usr/bin/perl
###############################################################################
#
#
# MODULE NAME: forward.pl
#
# MODULE OVERVIEW: parse mail to from the external web site for the
resumix
# system and save it to disk
#
# USAGE:
#
# MODULE REVISIONS:
# date initials description
# -------- -------- ---------------------------------------------
# 01/10/97 JMD Creation of script
#
###############################################################################
# Load any includes and Library Functions Here
#
#
# Assigning the following variable ($|) to a non-zero value will cause
# the output buffer to flush after every write or print statement is
# executed. Set it to zero(0) if you want to manually flush buffer.
$| = 1;
#
# Retrieve any parameters passed. This routine will retrieve them
# from either the Command Line or from the variable QUERY_STRING or
# from the Input Buffer.
&processMail;
#
# Exit Program
exit(0);
#--------------------------------------------------------------------
#--------------------------------------------------------------------
sub processMail {
$header = 1;
while(!eof(STDIN))
{
#
# Process the inout from mail
$line = <STDIN>;
#
# Check to see if we are still getting header information
if ($header)
{
#
# Check to see if we have subject line and grab filename
if ($line =~ /^Subject:/)
{
chop($line);
($filename = $line) =~ s/^Subject://;
$filename =~ s/ //g;
}
#
# If line is header line then reset $header variable
if ($line =~ /^s - - - - -/)
{
$header = 0;
#
# We no longer have header info so Open a local file
open(OUTFILE, "> $filename");
}
}
elsif (!($line =~ /^s - - - - -/))
{
#
# If we have message area then chop off EOF and send to file
chop($line);
print OUTFILE "$line\n";
print "$line\n";
}
}
close(OUTFILE);
}
------------------------------
Date: Thu, 01 Oct 1998 15:31:43 -0400
From: shambop@bacon-and-spam.timeoutny.com (Shambo Pfaff)
Subject: how to pass FORM variable to second cgi?
Message-Id: <shambop-0110981531430001@www.timeoutny.com>
I want an HTML form to send two variables, one which is a generic text
string, another which dictates which second cgi script gets this text
string. I've gotten to the point where I can get my cgi script to reead
the input from the form, but I can't figure out how to trigger the second
cgi script based on the variable from the first script.
In other words,
$string = $FORM{'string'};
$cgitorun = $FORM{'cgittorun'};
This is what I'm using to grepare the variables from the form to go to,
and execute, the second cgi script.
The $cgitorun variable triggers the cgi selected by the user
(cgi-bin/mycgi.cgi, for example), and $string sends that value to the
second cgi.
I've been messing around with
system(perl $cgitorun);
but can't figure out how to pass it the $string variable from the form.
Any help would be greatly appreciated.
Feel free to e-mail direct.
Thanks,
Shambo Pfaff
------------------------------
Date: Thu, 1 Oct 1998 14:43:05 -0500
From: "Jerry Henderson" <jerrware@mwis.net>
Subject: Re: IDE for Perl
Message-Id: <3613db74.0@news.slc.bfp.net>
The closest thing I've seen to an IDE is PERL Builder by
www.solutionsoft.com . Haven't seen anything with a class browser yet.
Jerry
Marcin Kolbuszewski wrote in message <3613BCB8.E18CDF20@mail.cebra.com>...
>Perl is a mature OO language now and would benefit (at least in my
>opinion) from some sort of GUI driven environment to do development.
>Although it may be contrary to the spirit of the language and many
>purists
>will call me names, I think a simple class browser would help
>development of
>applications.
>
>For example we've just started modelling and prototyping a quite large
>OO
>system in Perl. We feel just like C++ people in late 80s or Smalltalk
>people before
>PARC times...
>
>Have you seen anything even remotely resembling an IDE for Perl?
>
>Marcin Kolbuszewski
>
>
------------------------------
Date: 1 Oct 1998 20:06:32 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: IDE for Perl
Message-Id: <6v0nc8$4jr$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to Jerry Henderson
<jerrware@mwis.net>],
who wrote in article <3613db74.0@news.slc.bfp.net>:
> The closest thing I've seen to an IDE is PERL Builder by
> www.solutionsoft.com . Haven't seen anything with a class browser yet.
CPerl includes one.
Ilya
------------------------------
Date: Thu, 1 Oct 1998 12:03:51 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Ignore multiple input record seperators
Message-Id: <MPG.107d71ef8a4510b9897d0@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and a copy mailed.]
In article <6v04e6$i83$1@nnrp1.dejanews.com> on Thu, 01 Oct 1998 14:43:18
GMT, aonghus.onia@ucg.ie <aonghus.onia@ucg.ie> says...
> Is it possible to Ignore multiple input record seperators eg multiple spaces
> when reading input. (the no. of spaces is not constant). I know I could test
> for repeated spaces but I am reading in from an extremly large file an I want
> it to be as efficient as possible.+
>
>
> eg.
>
> $/=" ";
> while(<>){
> print;
> print "\n"
> }
>
> 1 2 3
>
> produces:
> 1
> 2
>
> 3
>
> instead of
> 1
> 2
> 3
Rereading your submission in view of the answers from Ilya Zakharevich
and John Porter makes me more aware of an ambiguity in your problem
description that has led us to different interpretations.
You characterize spaces as input record separators, and say nothing of
newlines. You show a single-line file as your test case. Is the
'extremely large file' you are reading also devoid of newlines?
John's approach separated the file on single or multiple spaces, and
inlcuded new-lines in the data. Mine just squeezed multiple spaces to
singles, line by line.
Assuming that you want to split records on both spaces and newlines, this
is probably the most efficient approach:
while (<>) {
chomp;
push @records, split ' ';
}
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Thu, 01 Oct 1998 20:35:38 GMT
From: darreneswap@my-dejanews.com
Subject: Image tag script pull
Message-Id: <6v0p2r$l32$1@nnrp1.dejanews.com>
Hi
I want to call a script either as an image tag or using SSI.
The problem is that I want to pull a certain sub from the script.
E.g.
The URL I want to pull is:
http://www.*****.com/cgi-bin/test.cgi?comp
If I run it from the browser it is fine and gives me the figure I need, but
from SSI it tells me an error has ocurred ... blah blah blah
Anyone help?
Thanks
Darren
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Thu, 01 Oct 1998 15:07:26 -0400
From: Chris Thompson <ct@NOSPAMcthompson.org>
Subject: Is Net::FTP (libnet-1.0605) threadsafe?
Message-Id: <3613D2EE.E4AB8A37@NOSPAMcthompson.org>
I have a program that uses Net::FTP to retrieve a file, it ran great
until I switched to a threaded verion of perl. (5.005_02 on Linux
2.0.34). Now Net::FTP->new($host) just segfaults.
Is libnet not threadsafe? I cant find anything in the docs or on
Dejanews.
-Chris
------------------------------
Date: Thu, 01 Oct 1998 15:26:07 -0400
From: Chris Thompson <ct@NOSPAMcthompson.org>
Subject: Re: Is Net::FTP (libnet-1.0605) threadsafe?
Message-Id: <3613D74F.A9D341EA@NOSPAMcthompson.org>
I forgot to mention one thing, the Net::FTP requests are running INSIDE
a thread.
for example...
#!/usr/bin/tperl -w
use Net::FTP;
use Thread;
use Thread::Queue;
$myq = new Thread::Queue;
$myt = new Thread \&ftpit, NULL;
$blah = $myq->dequeue;
sub ftpit {
print "Before\n";
$ftp = Net::FTP->new("somebox");
print "After\n";
$ftp->login("user","pass");
print "after login\n";
$ftp->get("file", "dest/file");
print "Got\n";
$ftp->quit;
$myq->enqueue("foo");
}
The above segfaults on the Net::FTP->new when I run it on Linux 2.0.34
running the same on Threaded perl for NT I get a nice visit from Dr.
Watson.
----------------------
Chris Thompson
Chris Thompson wrote:
> I have a program that uses Net::FTP to retrieve a file, it ran great
> until I switched to a threaded verion of perl. (5.005_02 on Linux
> 2.0.34). Now Net::FTP->new($host) just segfaults.
>
> Is libnet not threadsafe? I cant find anything in the docs or on
> Dejanews.
>
> -Chris
------------------------------
Date: Thu, 01 Oct 1998 20:14:08 GMT
From: joost@dt.net
Subject: linking perl modules to C
Message-Id: <6v0nqf$j0u$1@nnrp1.dejanews.com>
Hi,
I am currently embedding Perl into my C program in order
to run perl files from my C program without running a
'stand-alone' perl interpreter.
I got the info from the perlembed faq:
http://theory.uwinnipeg.ca/CPAN/data/pod2texi/perlembed.html
This works all great, only I have a problem with
linking the perl module Socket.pm into my program
which is used in the perl file I am starting from my
C source.
Is there anybody out there who has done this before
and who knows how to link this particular module?
Please let me know,
regards,
Joost Zuurbier
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 01 Oct 1998 19:30:03 GMT
From: droby@copyright.com
Subject: Re: Need IP Address Sort Subroutine
Message-Id: <6v0l7r$fs0$1@nnrp1.dejanews.com>
In article <lahfxoxwxj.fsf@erh.ericsson.se>,
Michal Rutka <erhmiru@erh.ericsson.se> wrote:
> > |> It took me about 10 seconds to understand a syntax. I didn't found it
pretty.
> > |> And one more thing, in a job which I do I learned to use a word
'transform' to
> > |> more complicated things than a simple data manipulation. That's why I
call it
> > |> a Schwartzian thing.
> >
> > I suggest you look up transform in a dictionary.
>
> And start calling grep as 'transformation program'. No thanks.
>
If Laplace and Fourier can have transforms named after them, why can't Randal?
In the traditional use of the word in math, a pair of inverse transforms
convert the problem from a domain where it's difficult to a domain where it
can be handled more easily and then convert the result back. This is exactly
what the algorithm is doing, so it's an appropriate use of the word, at least
to a mathematician.
grep, on the other hand, is not a transform, and I don't think I heard anyone
refer to it as such. It's plenty useful, but not a transform.
Now, what are these extraordinarily complex things that you call transforms?
--
Don Roby
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 01 Oct 1998 11:37:46 -0700
From: "Phinneas G. Stone" <phinneas@eskimo.com>
Subject: Re: passing javascript vars to CGI
Message-Id: <3613CBFA.495F8EA5@eskimo.com>
Michael Hicks wrote:
> Doesn't the WRAP=PHYSICAL attribute do this for you?
> --
Doesn't seem to, no. All the line breaks are just converted to spaces.
------------------------------
Date: 1 Oct 1998 19:12:58 GMT
From: "Stephen O. Lidie" <lusol@Pandora.CC.Lehigh.EDU>
Subject: Re: Problem installing Tk.pm, help/guidance please
Message-Id: <6v0k7q$ku0@fidoii.cc.Lehigh.EDU>
Elliott Brooks <e.brooks@dial.pipex.com> wrote:
> Hi all,
> (not sure if this should be posted in linux newsgroup or perl but here goes)
> I love PERL and wanted to try playing with adding a GUI front end with TK as
> described in the Advanced Perl Programming book.
> My setup is an old Intel pentium running Linux, Redhat 5.1.
> (Yes, I am trying to do this while logged in as root.)
> I have downloaded Tk800_011_tar.gz from CPAN
> unzipped and untarred it read the readme, ran PERL Makefile.PL which is
> successful except for at the end says it cannot find Test.pm.
> Full output below.
> so downloaded Test-1_08_tar.gz, unzipped and untarred it which complained
> that it could not find Harness.pm.
> Full output at bottom below.
> Harness.pm already exists and sits in /usr/lib/perl5/Test/
> This leaves me a bit stuck. I have tried moving .pm files around a bit
> I am unsure as to how to proceed.
> would appreciate some help/guidance please
> rgds
I'm pretty sure all you need to do is install a newer perl... like 5.005_02.
Then try a clean Tk install..... should work OK.
------------------------------
Date: Thu, 1 Oct 1998 12:42:57 -0600
From: "Keith L. Miller" <miller@bigsky.net>
Subject: Searching for a string
Message-Id: <6v0iij$2k5$1@hydra.bigsky.net>
I'm using the code below to try and find the name goofy in a file that has
lines formatted as follows:
goofy info:1234 dataaboutgoofy
but I keep getting r-goofy returned also. I don't understand why the dash
would mess anything up. There are other occurances in the file like sgoofy
and jgoofy that don't get returned but if there is a dash it does. Anyone
know why this is happening and how I can fix this?
Oh, one last thing, I did look through the FAQ and the Programming Perl and
Learning Perl books so please don't flame me if this turns out to be a dumb
easy question?
$name="goofy";
open(IN, "filename");
while(<IN>){
s/\s+//g;
@fields = split(/\s/, $_);
if ($fields[0] =~ /\b$name\b/){
print "$fields[0]";
}
}
close(IN);
Keith Miller
------------------------------
Date: Thu, 1 Oct 1998 15:55:12 EDT
From: dblack@saturn.superlink.net (David A. Black)
Subject: Re: Searching for a string
Message-Id: <6v0mn0$nvf$1@earth.superlink.net>
Hello -
"Keith L. Miller" <miller@bigsky.net> writes:
>I'm using the code below to try and find the name goofy in a file that has
>lines formatted as follows:
>goofy info:1234 dataaboutgoofy
>but I keep getting r-goofy returned also. I don't understand why the dash
>would mess anything up. There are other occurances in the file like sgoofy
>and jgoofy that don't get returned but if there is a dash it does. Anyone
>know why this is happening and how I can fix this?
> $name="goofy";
> open(IN, "filename");
> while(<IN>){
> s/\s+//g;
> @fields = split(/\s/, $_);
> if ($fields[0] =~ /\b$name\b/){
> print "$fields[0]";
> }
> }
> close(IN);
First of all, if you remove all the whitespace from the string, splitting
on whitespace won't do you much good....
Also - and more directly answering your question - the string "r-goofy"
does match the pattern /\bgoofy\b/. \b is a zero-width assertion, which
is TRUE if there is a \w character on one side of it and a \W on the
other. Since - is \W and g is \w, it matches if $fields[0] eq "r-goofy".
If you're looking for goofy at the beginning of the string (which is what
it sounds like), and nothing after goofy, you would use: /^goofy$/
David Black
dblack@saturn.superlink.net
------------------------------
Date: Thu, 1 Oct 1998 13:06:53 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Searching for a string
Message-Id: <MPG.107d80b93ea59b5a9897d1@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and a copy mailed.]
In article <6v0iij$2k5$1@hydra.bigsky.net> on Thu, 1 Oct 1998 12:42:57 -
0600, Keith L. Miller <miller@bigsky.net> says...
> I'm using the code below to try and find the name goofy in a file that has
> lines formatted as follows:
>
> goofy info:1234 dataaboutgoofy
>
> but I keep getting r-goofy returned also. I don't understand why the dash
> would mess anything up. There are other occurances in the file like sgoofy
> and jgoofy that don't get returned but if there is a dash it does. Anyone
> know why this is happening and how I can fix this?
>
> Oh, one last thing, I did look through the FAQ and the Programming Perl and
> Learning Perl books so please don't flame me if this turns out to be a dumb
> easy question?
>
> $name="goofy";
> open(IN, "filename");
> while(<IN>){
> s/\s+//g;
> @fields = split(/\s/, $_);
> if ($fields[0] =~ /\b$name\b/){
> print "$fields[0]";
> }
> }
> close(IN);
First, to answer your question directly, look closely at the definition
of the '\b' assertion. It matches a transition between a character that
matches \w and a character that doesn't, in either direction. '-'
doesn't matche \w and 'g' matches \w, so there you are matching on
'goofy'. You can fix it by being more explicit instead of using \w:
/[^\w-]$name\b/o for example. (Careful: in other than the first or last
positions in the character class, you need to write \- .)
I added the '/o/ because you really don't want to compile the regex every
time through the loop. If $name does change between uses of the loop,
you may want to do something more clever, with 'eval' -- read the docs.
Second, there are several odd things about the program (in addition to
your failure to check the result of 'open'):
The first line in the loop strips all white-space characters from the
string, then the next line splits on white-space characters. So you get
an array of one element. Fortunately, that is all you use, but what did
you really have in mind?
What is the function of the quotes in the 'print' statement?
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Thu, 01 Oct 1998 20:46:58 GMT
From: darrensw@netscape.net
Subject: SSI call
Message-Id: <6v0po2$m6m$1@nnrp1.dejanews.com>
Hi
I have a URL which I can call from the URL line, no problem, but when i try to
call from SSI I get an error processing directive massage.
The URL is:
http://www.*****.com/cgi-bin/test.cgi?comp
I think the ?comp reference to the sub comp is the problem.
Can anyone help??
Rgds,
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 01 Oct 1998 13:40:18 -0700
From: Kin Cho <kin@omni.c-cube.com>
Subject: trapping die in Perl debugger?
Message-Id: <cohpvcc583x.fsf@omni.c-cube.com>
Hi,
I'd like to the debugger to gain control when
my program calls die.
-kin
------------------------------
Date: 1 Oct 1998 21:23:50 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: trapping die in Perl debugger?
Message-Id: <6v0rt6$8hh$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to Kin Cho
<kin@omni.c-cube.com>],
who wrote in article <cohpvcc583x.fsf@omni.c-cube.com>:
> Hi,
> I'd like to the debugger to gain control when
> my program calls die.
It does. What do you want *exactly*?
Ilya
------------------------------
Date: Thu, 01 Oct 1998 21:25:18 GMT
From: webmaster@vaticanart.com
Subject: URL not working in Eudora via perl script
Message-Id: <6v0rvu$p7n$1@nnrp1.dejanews.com>
I have a perl script which uses sendmail to send an HTML enriched email. I am
receiving the email with Eudora Pro 4.01 for the Mac. The HTML comes in fine,
however the hyperlinks are not clickable. I believe the reason for this is due
to the length of the hyperlink (112 characters) and from viewing the incoming
source in Eudora the hyperlink appears to be wrapping at 80 characters and
thus I believe this causes the Mac Eudora to choke in regard to recognizing it
as a URL.
I called Eudora Tech support to see if the problem was with their software
wrapping the incoming source code, they said no. Then perhaps the problem is
in the sending routine eh ? Is there anyway to prevent the outgoing HTML in
perl from wrapping at 80 characters ?
Here is a sample from my perl script:
--------------------------------------
open (MAIL,"|$sendMail myEmail\@somewhere.com);
print MAIL <<END_OF_HTML;
To: you\@somewhere.com
From: me\@somewhere.com
Subject: Test
Content-Type: text/html; charset=us-ascii
<HTML>
<HEAD>
<TITLE>Test</TITLE>
</HEAD>
<BODY>
.... and the two hyperlinks go here which are 112 characters long.
-------------------------------------- The hyperlinks are NOT wrapped onto
different lines in my perl code. So I guess my question is, where is the
problem? Are the tech guys at Eudora wrong and it is wrapping the source, or
does my Content-Type header need some sort of column width characteristic?
Thanks -
Jason L.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 12 Jul 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 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 3868
**************************************