[7685] in Perl-Users-Digest
Perl-Users Digest, Issue: 1311 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Nov 13 09:17:05 1997
Date: Thu, 13 Nov 97 06:00:59 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 13 Nov 1997 Volume: 8 Number: 1311
Today's topics:
Re: ./[script.pl] not working (Tad McClellan)
Re: ASCII to UNIX <billg@networkapparel.com>
Re: Better Way in Perl <curtis@ei.kodak.com>
Re: Can DBM be used for this problem? <craig@netcentral.net>
Re: creating file (Michael J. Maravillo)
GUI for perl? <qhsjoam@aom.ericsson.se>
How do you pass a codeRef to the sort sub <tw36027@glaxowellcome.com>
Re: htpasswd help! PLEASE! <qdtcall@esb.ericsson.se>
Re: htpasswd help! PLEASE! (Mike Stok)
Re: Newbie Q: Perl @HASH and C Structures <domi@marlis.grenoble.hp.com>
Re: OS/2: Core dumped on s/// Bug? (Ilya Zakharevich)
Re: OS/2: Core dumped on s/// Bug? <koos_pol@bigfoot.com>
problem with Telnet module <tim@hcirisc.cs.binghamton.edu>
readline <pittd@iscmed.med.ge.com>
Re: readline (Tad McClellan)
s/PATTERN/REPLACE/eeg with list context? (James Wang)
Re: s/PATTERN/REPLACE/eeg with list context? (Tad McClellan)
Re: Seeking help with File::Find <Steve_Kilbane@cegelecproj.co.uk>
Re: sockets and WindowsNT (Kjetil Skotheim)
Tk/Motif/Embedded Perl question <lagerwey@knmi.nl>
Wanted: Web Based FTP program <booboorazoom@hotmail.com>
What's CGI->footer? (Michael Kichanov)
WIN32:ODBC Problems <loucksg@enternet.com.au>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 13 Nov 1997 06:10:26 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: ./[script.pl] not working
Message-Id: <inqe46.d13.ln@localhost>
Radix (tristram@freemail.c3.hu) wrote:
: Hello ppl,
Hello prsn.
: It runs the script. Still, i cant run it from ./[script.pl]. As I
: understand it would be needed to implement perl scripts on the web
: server.
: Any help appreciated, thanks.
Here is some help.
Ask perl questions in the perl newsgroup and ask server setup questions
in a server newsgroup.
You have a server setup question.
Perl does not have a server.
Try an on-topic newsgroup such as:
comp.infosystems.www.servers.unix
comp.infosystems.www.servers.misc
--
Tad McClellan SGML Consulting
tadmc@flash.net Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 13 Nov 1997 08:00:52 -0500
From: Bill Guindon <billg@networkapparel.com>
Subject: Re: ASCII to UNIX
Message-Id: <346AFA03.CE003823@networkapparel.com>
I am (dangerously) assuming you are going from an MS based pc to a unix box.
I applaud the others for their perl based answers (I'm a newbie, not quite up
to that yet), but you could also see if your unix host has 'dos2unix' on it.
Try:
man dos2unix
Brock Sides wrote:
> In article <3466C584.E852A16E@mail.miworld.net>, "C. Thomas Wright III"
> <ctwright@mail.miworld.net> wrote:
>
> > I have some scripts that I want to use but they are written in ASCII
> > format. When I transfer them over, the CR and LF are left on the end of
> > all the lines. The programs cannot find PERL (ie. #!/usr/bin/perl) and
> > my tags won't work (ie. print <<"EOF").
> >
> > I have tried to upload in both BINARY and ASCII. Didn't seem to help
> > any.
> >
> > Thanks for the help...
>
> (1) Try setting the #! line to #!/usr/local/bin/perl -- that's where it is
> on a lot of systems.
>
> (2) Once you have your PATH variable properly set (assuming perl is in
> /usr/local/bin, type PATH=$PATH:/usr/local/bin at the command line),
> utter the following magical incantation:
>
> perl -pi~ -e 's/\r//g;' *
>
> This will remove all CRs from all files in the current directory, and
> create backup files ending in ~, just in case. Or better yet, get a decent
> text-editor that lets you configure your line-endings to UNIX-style.
------------------------------
Date: Thu, 13 Nov 1997 08:11:54 -0500
From: Walker Curtis <curtis@ei.kodak.com>
To: "E.None Archibald" <yevgene@xochi.tezcat.com>
Subject: Re: Better Way in Perl
Message-Id: <346AFC99.6A9B0B78@ei.kodak.com>
Hi Eugene,
Abigail beat you to the punch. She posted the same thing a day
or two ago. It's still a great entry. Everyone who has responded
to this has added something good.
Also, Most of the boxes I'm working on are running IRIX and csh or sh.
I can't seem to get away with leaving out the
space after the e. Is there something I am missing?
-wc
E.None Archibald wrote:
> Oops!
>
> Just after i posted this i figured out a 35/36 character one:
>
> ls|perl -nle'/\.cin$/&&`mv $_ $\``' (35)
> ls|perl -nle '/\.cin$/&&`mv $_ $\``' (36)
>
> --eugene
>
> E.None Archibald <yevgene@xochi.tezcat.com> wrote:
> : ls|perl -ne 's/(.*)\.cin$/`mv $& $1`/e' (tied at 38 characters)
>
> : however, there is no need for a space after the -e argument:
>
> : ls|perl -ne's/(.*)\.cin$/`mv $& $1`/e' (tied at 37 characters, omitting the
> : same space)
>
> : --eugene
>
> : Walker Curtis <curtis@ei.kodak.com> wrote:
> : : It would be correct behavior for 6.cin.cin to be renamed
> : : to 6.cin. Sorry if this wasn't clear originally.
>
> : : So far I see
>
> : : perl -e 'map{`mv $_ $\``if/\.cin$/}<*>' (39 characters, perl 5.002 or
> : : later)
>
> : : ls|perl -ne '`mv $\`$& $\``if/\.cin$/' (38 characters)
>
> : : ls|perl -ne '/\.cin$/&&`mv $\`$& $\``' (38 characters)
>
> : : ls *.cin|sed 's/\(.*\)\..*/mv & \1/'|sh (39 characters)
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Walker Curtis phone: 716-477-8761 |
| Eastman Kodak Company fax: 716-477-8788 |
| Entertainment Imaging email: wcurtis@kodak.com |
| 2400 Mt. Read Blvd pager: 1-800-790-6803 (emergency) |
| Rochester, NY 14650-3092 KMX: 257-8761 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------
Date: Wed, 12 Nov 1997 11:32:17 -0600
From: "Craig W. Hansen" <craig@netcentral.net>
Subject: Re: Can DBM be used for this problem?
Message-Id: <64cp73$9ja@apple.telalink.net>
>> Our system has dbm, ndbm, and gdbm. If I store the
>> applications and the arguments in one of these databases
>> (using a Perl program to store and read the arguments),
>> is this a reasonable solution to this problem ? Or,
>> can anyone suggest alternate solutions.
>
>Yes, IMHO that is how to solve it most efficiently.
>
>What I would do is use the app name (app00..app99)
>as the key to the dbm file, with the data for that key
>being the arguments.
>
>To solve the problem of last app executed, include a field,
>last_app_exec => app?? . Then just look up app?? for it's
>arguments to print.
A good way to keep track of this info on a per-user basis would be to have
small, separate gdbm files in each user's home directory. (i.e.
"~/.appargs.gdbm")
Then all you need to do is store the app name as the key, and the args as
the value.
I agree on GDBM -- it rules.
--
Craig W. Hansen
President
NetCentral, Inc.
craig@netcentral.net
http://www.netcentral.net
------------------------------
Date: 11 Nov 97 20:06:37 GMT
From: mmj@fiesta.philonline.com.ph (Michael J. Maravillo)
Subject: Re: creating file
Message-Id: <slrn66hf1c.h0v.mmj@fiesta.philonline.com.ph>
Steven Paul Adelman <crew@gladstone.uoregon.edu> wrote:
>
>Is there a better way to create a file from a CGI script using PERL than
>
>system('echo >/foo/bar');
open(F, '>/foo/bar');
close(F);
--
Mike
[ Michael J. Maravillo Philippines Online ]
[ System Administrator PGP KeyID: 470AED9D InfoDyne, Incorporated ]
[ http://www.philonline.com/~mmj/ (632) 890-0204 ]
------------------------------
Date: Thu, 13 Nov 1997 13:11:48 +0100
From: Johannes Amtin <qhsjoam@aom.ericsson.se>
Subject: GUI for perl?
Message-Id: <346AEE84.2F8C@aom.ericsson.se>
Hi!
I was wondering if anyone has tried to make a GUI for generating perl
code (or code in a similar language). Just curious.
Johannes Amtin
------------------------------
Date: Thu, 13 Nov 1997 07:39:45 -0500
From: Thad Welch <tw36027@glaxowellcome.com>
Subject: How do you pass a codeRef to the sort sub
Message-Id: <346AF510.EBC40B2D@glaxowellcome.com>
Striped to its basics, here's what I'm trying to do:
print objSort( sub { $a cmp $b } );
sub objSort{
my $codeRef = shift;
my @objs = qw( c b a );
return sort $codeRef @objs
}
Not a GLOB reference at t.pl line 9 error. It gags on the $codeRef.
What am I doing wrong?
Thanks,
Thad
------------------------------
Date: 13 Nov 1997 10:37:42 +0100
From: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: htpasswd help! PLEASE!
Message-Id: <iszpn9gmmx.fsf@godzilla.kiere.ericsson.se>
Me@home.sleeping (Me) writes:
> Does anyone know exactly how servers salt their crypt of the password?
By choosing two characters randomly from the set [a-zA-Z1-9./].
> $encrypted_password = crypt ($unencrypted_password,$salt);
So you could do something like
@a = split(//,"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890./");
$encrypted = crypt($plain,$a[rand @a].$a[rand @a]);
> Is the unencrypted password a combination of the unencrypted
> password and login?
I can't make much sense out of that.
--
Calle Dybedahl, UNIX Sysadmin
qdtcall@esavionics.se http://www.lysator.liu.se/~calle/
------------------------------
Date: 13 Nov 1997 13:36:42 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: htpasswd help! PLEASE!
Message-Id: <64evpa$nhn@news-central.tiac.net>
In article <64dcbk$a0f$1@goblin.uunet.ca>, Me <Me@home.sleeping> wrote:
>I'm currently trying to figure out how the heck
>I can re-create or at least emulate the
>htpasswd command in perl.
>
>essentially I want to be able to configure
>an .access file, without having to telnet
>into the server everytime.
>
>Does anyone know exactly how servers
>salt their crypt of the password?
>
>I know the comman basically loogks like
>
>$encrypted_password = crypt ($unencrypted_password,$salt);
>
>but what is the proper salt sequence?
>Is the unencrypted password a combination of the
>unencrypted password and login?
If you're encrypting the password for the first time then you need to
generate the salt. Recent perls automatically seed the random number
generator for you when you call rand the first time so you might say
# if you call srand just call it once (unless you know why
# you want to call it more than once in a program) with a "good"
# seed
srand (time ^ ($$ + ($$ << 15)));
@alphabet = ('a' .. 'z', 'A' .. 'Z', '0' .. '9', '.', '/');
$salt = $alphabet[rand @alphabet] . $alphabet[rand @alphabet];
$encrypted = crypt $password, $salt;
Note that the first 2 chars of the encrypted password are the salt you
used, and the crypt function is considered one way. So with a salt of
'3D' and a password of 'banana' the encrypted string is '3DaOBfszGu3HA'
The way to check if the password a user tried is OK is to encrypt it and
see if the result is the same as the encrypted version e.g.
$encrypted = '3DaOBfszGu3HA';
$attempt = 'Banana'; # note capital B
$check = crypt $attempt, $encrypted;
# now $check = '3DCoIMWSk8Dic' which isn't '3DaOBfszGu3HA'
$ok = $check eq $encrypted;
Hope this helps,
Mike
--
mike@stok.co.uk | The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/ | PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/ | 65 F3 3F 1D 27 22 B7 41
stok@colltech.com | Collective Technologies (work)
------------------------------
Date: 13 Nov 1997 10:52:51 +0100
From: Dominique Dumont <domi@marlis.grenoble.hp.com>
Subject: Re: Newbie Q: Perl @HASH and C Structures
Message-Id: <vkziutxnmrw.fsf@marlis.grenoble.hp.com>
coyote ghost <zeropage@computek.net> writes:
> Hello o' venerable Perl Programmers,
>
> I'm a seasoned C programmer, but I am just now getting into Perl. I
> have some C binary database files that I.ve created and I'd like to
> create a library for perl to access them.
>
> It appears that the closest thing to a C structure in perl is an
> associative array, so is it possible to create an associative array to
> duplicate my C structure, then use that array to read and write to a
> file, as I would with a structure in C? (The key to this being that the
> C structure and the Perl Array will be set up to be the exact same size
> in terms of bytes used.)
>
> I'd really appreciate hearing from anyone that has any ideas on how this
> task might be accomplished.
>
A possible solution is to write some C functions to access the binary with the
relevant structures and use SWIG to generate the interface to access these
C functions from perl.
Check http://www.cs.utah.edu/~beazley/SWIG/
Hope this helps
--
Dominique_Dumont@grenoble.hp.com
------------------------------
Date: 13 Nov 1997 09:58:28 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: OS/2: Core dumped on s/// Bug?
Message-Id: <64ej04$kv$1@agate.berkeley.edu>
In article <3469BD51.384@bigfoot.com>, Koos Pol <koos_pol@bigfoot.com> wrote:
> I run Perl (5.004_01) on OS/2 Warp 4.0. My script dumps core on an s///
> statement. After checking some values, I found the following
> success/failure bounderies. It all seems to come down on the REPLACEMENT
> $string = 'a' x 1000;
> $search = 'b' x 128; <- Getting worse
> $replace = 'c' x 1000;
> $string =~ s/$search/$replace/;
>
> [C:\utils]perl test.pl
> Allocation too large at test.pl line 4.
Known bug of jumbo RE patch v1 (this is what OS/2 binary was shipped
with). Does not happen with my copy of 5.004_53 + v5 (but probably v2
or somesuch should be OK).
Ilya
------------------------------
Date: Thu, 13 Nov 1997 13:09:31 +0100
From: Koos Pol <koos_pol@bigfoot.com>
Subject: Re: OS/2: Core dumped on s/// Bug?
Message-Id: <346AEDFB.57CB@bigfoot.com>
Ilya Zakharevich wrote:
>
> Known bug of jumbo RE patch v1 (this is what OS/2 binary was shipped
> with). Does not happen with my copy of 5.004_53 + v5 (but probably v2
> or somesuch should be OK).
>
> Ilya
I don't know what jumbo RE is, neither the addendum +5. Do you say I
just reinstall the latest binaries from your CPAN area?
--
Koos Pol
----------------------------------------------------------------------
S.C. Pol tel: +31 20 3116122
PC Systems Administrator email: Koos_Pol@bigfoot.com
Compuware Europe PGP public key available upon request
A little inaccuracy sometimes saves tons of explanation.
-- H. H. Munroe
------------------------------
Date: 13 Nov 1997 08:10:37 -0500
From: Tim Gray <tim@hcirisc.cs.binghamton.edu>
Subject: problem with Telnet module
Message-Id: <t0iutxq6r6.fsf@hcirisc.cs.binghamton.edu>
Hi there,
I am trying to use the Telnet.pm module on a system where I
don't have root and therefore can't actually install the module
properly. So I put the module in the same directory as my script. I
have tried to 'use' it several ways but none work.
use Net::Telnet #no shock there since it isn't in $PERL5LIB/Net
use Telnet;
use Telnet ();
No matter what it "can't locate object method new vie package Telnet".
The code snippet that instantiates the Telnet object looks like this
$popbox = new Telnet (Host => "mail.binghamton.edu",
Port => 110);
Any suggestions? Thanks.
------------------------------
Date: Thu, 13 Nov 1997 02:20:33 -0600
From: Daniel Pittenger <pittd@iscmed.med.ge.com>
Subject: readline
Message-Id: <346AB851.41C67EA6@iscmed.med.ge.com>
Sorry if this has been covered a million times--
I have just started learning perl and I have gotten 2 books on the
subject, but I can't seem to find an answer to my question and it's
2AM!!
Here's my problem/question:
I'm trying to add a feature to an already working script.
Here's the partial code:
foreach $file (</home/pittd/public_html/*.html>) { # We
search #all
the .html
# files in:
open(HTML, $file); # the
dir undef $/;
$body=<HTML>; # read the entire file into a
# variable $body
$/="\n";
close(HTML);
if ($body=~/$FORM{$name}/i) { # check to see if
# it contains the key passed
# from a form post.
push(@doclist, $filename); # if so, put the
filename
# in the array
}
}
Then later down the road I print back to the browser the doclist as
links.
What I want to do is take the $body variable, when it contains the key
($name), and search it line by line until I find the subject line
ie: if ($body=~/Subject/i){ and then put the entire subject line into
an array that I can later pop to use as the link name in the HTML
instead of the filename. (This is what it looks like now):
foreach $name (@doclist) {
print "<li><a href=http://x.x.xxx.xxx/~pittd/$name>$name</a>\n";
}
In other words, I want to use the subject line of the message, instead
of the $name variable, to be the link description in the browser.
Does that make sense?
Basically I need to know how can I read from a string variable ($body)
until I come to the word "Subject:" and seperate out and store that line
for later use.
This is a great language!
Thanks,
Dan
------------------------------
Date: Thu, 13 Nov 1997 06:17:28 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: readline
Message-Id: <o4re46.f23.ln@localhost>
Daniel Pittenger (pittd@iscmed.med.ge.com) wrote:
: Sorry if this has been covered a million times--
: I have just started learning perl and I have gotten 2 books on the
: subject, but I can't seem to find an answer to my question and it's
: 2AM!!
: Here's my problem/question:
: I'm trying to add a feature to an already working script.
^^^^^^^^^^^^^^^^^^^^^^
Your script has bugs.
You have just been fortunate that they have not been revealed yet.
: Here's the partial code:
: foreach $file (</home/pittd/public_html/*.html>) { # We
: open(HTML, $file); # the
You should ALWAYS check the return value from open():
open(HTML, $file) || die "could not open '$file' $!";
: Basically I need to know how can I read from a string variable ($body)
: until I come to the word "Subject:" and seperate out and store that line
: for later use.
push @subjects, $1 if $body =~ /^(Subject:.*)/m;
--
Tad McClellan SGML Consulting
tadmc@flash.net Perl programming
Fort Worth, Texas
------------------------------
Date: 12 Nov 1997 11:37:00 GMT
From: jwang@harbinger.sims.berkeley.edu (James Wang)
Subject: s/PATTERN/REPLACE/eeg with list context?
Message-Id: <64c4cs$33o$1@agate.berkeley.edu>
i'm using the "s/(\$\w+)/$1/eeg" idiom to expand
simple embedded variables, per the example given
in the manpages.
now i would like to expand list variables, arrays
to be specific. the obvious thing i tried was:
"s/(\@\w+)/$1/eeg", which returned the lengths of
the arrays i'm after, rather than their content.
it appears that the $1 expression is evaluated
in scalar context, and i haven't been able to
convince it otherwise.
what am i missing? please cc: any followup.
------------------------------
Date: Thu, 13 Nov 1997 06:05:29 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: s/PATTERN/REPLACE/eeg with list context?
Message-Id: <9eqe46.d13.ln@localhost>
James Wang (jwang@harbinger.sims.berkeley.edu) wrote:
: i'm using the "s/(\$\w+)/$1/eeg" idiom to expand
: simple embedded variables, per the example given
: in the manpages.
: now i would like to expand list variables, arrays
: to be specific. the obvious thing i tried was:
: "s/(\@\w+)/$1/eeg", which returned the lengths of
: the arrays i'm after, rather than their content.
: it appears that the $1 expression is evaluated
: in scalar context, and i haven't been able to
: convince it otherwise.
s/\@(\w+)/join ' ', @{$1}/eg;
--
Tad McClellan SGML Consulting
tadmc@flash.net Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 13 Nov 1997 08:37:53 GMT
From: Steve Kilbane <Steve_Kilbane@cegelecproj.co.uk>
Subject: Re: Seeking help with File::Find
Message-Id: <bd7cd$82535.3da@news.cegelecproj.co.uk>
In article <3469E577.38A5@houston.Geco-Prakla.slb.com>, Dave Barnett <barnett@houston.Geco-Prakla.slb.com> writes:
> I'm attempting to use the File::Find module to find files > 7 days old,
> and (eventually) remove them.
uh-huh.
> Currently, I have the script set to just list the files, but am having
> some difficulty.
Is that "list the files to be removed", or "all files in the tree"?
> The code snippet I'm having difficult with is this one:
> sub exec {
> local($ok, @cmd) = @_;
> foreach $word (@cmd) {
> $word =~ s#{}#$name#g;
> }
> if ($ok) {
> local($old) = select(STDOUT);
> $| = 1;
> print "@cmd";
> select($old);
> return 0 unless <STDIN> =~ /^y/;
> }
> chdir $cwd; # sigh
> system @cmd;
> chdir $dir;
> return !$?;
> }
>
> The above is the part that the find2perl script created for me. My
> point(s) of concern are the chdir $cwd and chdir $dir lines. The chdir
> $dir line I have changed to $File::Find::dir (is that correct?), but I
> have been unable to find what I need to change the chdir $cwd line to.
> I tried with chdir $::cwd, chdir $File::Find::cwd, and $Cwd::cwd, all
> give the perl warning about use of an uninit. value.
You're tying yourself in knots unnecessarily here. find(1) has
two problems you don't want to deal with:
(a) it invokes a shell, via system, to exec your command.
(b) it runs the command in the directory find first ran in.
You could pretty much get by with this:
sub eachfile {
return if /^\.\.?$/; # Skip . and ..
unlink || rmdir if (-M $_ > 7);
}
finddepth(\&eachfile, @dirs);
This is because -M gives you your test, File::Find
chdirs to each directory before traversing it, and sets
$_ to be the name of the file, within that directory
(which both unlink and rmdir use by default).
You need to do a depth-first search, to make sure that
subdirs are deleted before current ones, if they're old.
Of course, if you don't want to delete old, empty directories,
use this:
find(sub { unlink if ( !-d $_ && -M _ > 7); }, @dirs);
--
<Steve_Kilbane@cegelecproj.co.uk> - All opinions are mine alone.
Kilbane's law of integration: standardise on protocols and file
formats, and the applications take care of themselves.
------------------------------
Date: 13 Nov 1997 13:15:11 GMT
From: kjetil.skotheim@usit.uio.no (Kjetil Skotheim)
Subject: Re: sockets and WindowsNT
Message-Id: <64eugv$e70$2@ratatosk.uio.no>
You have to print a request to the server before you can
expect something back. Try to put something like this just
before your while-loop:
print S "GET /index.html HTTP/1.0\n\n";
(I am not fluent in http, but I think it looks like that).
In article <345291AF.EB4D2ED@ibm.net>, percy.werners@ibm.net says...
>
>I tried the following code to make a socket connection to the http
>server on my Windows NT server. The socket connections seems to be OK,
>but if I want to print the lines returned from the socket, nothing
>happens. Somebody please advise.
>
>use Socket;
>.
>.
>.
>
> while (<S>) { # Here nothing is displayed!!
> print;
> }
------------------------------
Date: 13 Nov 1997 13:26:52 GMT
From: "Peter Lagerweij" <lagerwey@knmi.nl>
Subject: Tk/Motif/Embedded Perl question
Message-Id: <01bcf037$af53bf20$d8131791@btpab1.knmi.nl>
Is it possible to use Perl/Tk within a Motif application? I have Perl
embedded in a Motif
application, and I'd like to have the possibility for user scripts to pop
up Tk dialog boxes for simple
user interaction. This concept works in the test harness (which doesn't
use Motif), but when
integrated with the Motif application, I get a curious error: (something
like)
1256ab08 () Not a hash in file
/usr/local/lib/perl5/site_perl/Tk/MainWindow.pm on line 25.
For info, I'm using Tk400.202 (although VERSIONS file says Tk400.200) with
Perl5.004_01 on a DEC Alpha Unix v4.0b
I know Apache embeds Perl, but does it allow Tk widgets/dialogs?? Has
anyone else tried this?
Is this even possible? Is there some kind of conflict between Motif and
Tk?
------------------------------
Date: Thu, 13 Nov 1997 14:07:10 +0100
From: Michael <booboorazoom@hotmail.com>
Subject: Wanted: Web Based FTP program
Message-Id: <346AFB7D.94C6641@hotmail.com>
For a Job finding Site that would allow the staff of the company to edit
job entries without programming to eliminate the need for FTP and HTML
Editor. Contact me for further
specifications at booboorazoom@hotmail.com. Thank you.
------------------------------
Date: 13 Nov 1997 10:12:42 GMT
From: mike@mix.nordlink.ru (Michael Kichanov)
Subject: What's CGI->footer?
Message-Id: <64ejqq$1ma$1@Overlook.nordlink.ru>
In one of WWW applications that used CGI.pm I saw CGI->footer method.
But in CGI.pm this method not included.
I'm using CGI.pm-2.37b6 and perl 5.004
simple script
------
use CGI;
$q = new CGI;
print $q->header;
print $q->footer;
------
print out header.
And, of course, print out an error message "Undefined subroutine CGI::footer".
May be another CGI.pm exists? What's wrong else?
10x in advance for any comments
mike
------------------------------
Date: Wed, 12 Nov 1997 18:51:15 +1100
From: "Guy R. Loucks" <loucksg@enternet.com.au>
Subject: WIN32:ODBC Problems
Message-Id: <34695F5C.CD87A707@enternet.com.au>
--------------B602FDE24CD23BB02767F939
Content-Type: text/plain; charset=us-ascii; x-mac-type="54455854"; x-mac-creator="4D4F5353"
Content-Transfer-Encoding: 7bit
Ok, this is driving me off the deep end.
This is our configuration:
Windows NT 4.0 (Workstation and Server) Service PAK 2
Oracle 7.3.2.3.1 Workgroup Server (NT)
Oracle ODBC Driver
ODBC has checked out fine, with Excel, Access, ...
Perl version 5.003_07 Build 310 by Activeware
Initial problem was we were unable to locate the libraries. Have now
defined the PERL5LIB to point to c:\perl\lib
The perl program works fine, until we try to include the ODBC module. We
are using the latest version. Our program and the ODBC test program
provide the samer error:
error: parse exception,
This is generated whenever the line:
use Win32::ODBC;
is uncommented. We have tried with and without use strict, and are
using -w, no warnings or errors. This has to be something simple in the
setup or configuration.
No other environment variables are set. And the Perl\bin directory is in
the path.
the odbc.pll file is in the c:\perl\lib\auto\win32odbc directory
and odbc.pm is in the c:\perl\lib\win32 directory.
Any ideas would be greatly appreciated.
if you could also email : loucksg@enternet.com.au, as this group gets
purged sometimes before I can check back.
Thanks.
P.S. Sorry for the cross - post, I sent it to the wrong group the first
time..
--
Guy R. Loucks | "Everyone is a genius at least once a year.
"These opinions and | The real geniuses simply have their bright
ideas
ideas are my own, | closer togethor." G.C.
Lichtenberg
what few there are."|
--------------B602FDE24CD23BB02767F939
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<HTML>
Ok, this is driving me off the deep end.
<P>This is our configuration:
<BR>Windows NT 4.0 (Workstation and Server) Service PAK 2
<BR>Oracle 7.3.2.3.1 Workgroup Server (NT)
<BR>Oracle ODBC Driver
<P>ODBC has checked out fine, with Excel, Access, ...
<P>Perl version 5.003_07 Build 310 by Activeware
<P>Initial problem was we were unable to locate the libraries. Have now
<BR>defined the PERL5LIB to point to c:\perl\lib
<P>The perl program works fine, until we try to include the ODBC module.
We
<BR>are using the latest version. Our program and the ODBC test program
<BR>provide the samer error:
<P><B>error: parse exception</B>,
<P>This is generated whenever the line:
<P>use Win32::ODBC;
<P>is uncommented. We have tried with and without use strict, and
are
<BR>using -w, no warnings or errors. This has to be something simple in
the
<BR>setup or configuration.
<P>No other environment variables are set. And the Perl\bin directory is
in
<BR>the path.
<P>the odbc.pll file is in the c:\perl\lib\auto\win32odbc directory
<BR>and odbc.pm is in the c:\perl\lib\win32 directory.
<P>Any ideas would be greatly appreciated.
<P>if you could also email : loucksg@enternet.com.au, as this group gets
<BR>purged sometimes before I can check back.
<P>Thanks.
<P>P.S. Sorry for the cross - post, I sent it to the wrong group the first
time..
<BR>--
<BR>Guy R. Loucks |
"Everyone is a genius at least once a year.
<BR>"These opinions and | The real geniuses simply
have their bright ideas
<BR> ideas are my own, | closer togethor."
G.C. Lichtenberg
<BR> what few there are."|
<BR> </HTML>
--------------B602FDE24CD23BB02767F939--
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.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 1311
**************************************