[9545] in Perl-Users-Digest
Perl-Users Digest, Issue: 3139 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jul 13 10:10:13 1998
Date: Mon, 13 Jul 98 07:00:53 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 13 Jul 1998 Volume: 8 Number: 3139
Today's topics:
"@foo=<*>" missing files on FAT32 partitions? <yoshiko.beal@munich.netsurf.de>
Re: -w on production code (Tina Marie Holmboe)
a little newbie filehandle question miho21@yahoo.com
Re: Arrays (Shaun Sides)
binaries for SCO 3.2v4.2 faganb@my-dejanews.com
Re: Choosing DBMS: friendly to Linux, Apache, Perl, Jav <tauren@groovee.com>
compare arrays <brosich@univ.trieste.it>
Re: First meeting of Dallas.pm <neeri@iis.ee.ethz.ch>
Flow Analsys tools for perl <mat@icl.net>
Re: Help with cgi-lib.pl and input text boxes <perlguy@inlink.com>
Re: Help! MacPerl and STDIN (Bart Lateur)
how to tell execution vs require <rsharpe@ncsa.uiuc.edu>
Re: how to tell execution vs require <tchrist@mox.perl.com>
Re: hypertext links to files in ls output <quednauf@nortel.co.uk>
Re: Module installion on Windows 95 <clint@netcomuk.co.ukXX>
Pattern matching? (Anders Lindgren)
Re: Pattern matching? <quednauf@nortel.co.uk>
Re: perl 5.004.04 on AIX 4.2.1 <wer@kbsu.ru>
Re: PING / Traceroute Perl Script <rra@stanford.edu>
Re: Placing output from System() call into an array fro <qdtcall@esb.ericsson.se>
Re: Putting CPAN on a CD: good or not good? (Rahul Dhesi)
Re: Reading virtmaps.db with perl <qdtcall@esb.ericsson.se>
Re: s: simple-database <quednauf@nortel.co.uk>
Re: s: simple-database <Adam.K@idnet.de>
Re: s: simple-database <Adam.K@idnet.de>
Re: s: simple-database <quednauf@nortel.co.uk>
Sybperl (w/ CT-lib) (Manish M Mavani)
VRML linking to Perl <spotter@remove-to-reply.ms.com>
Re: What's the substitute for #! /usr/bin/perl in Win32 <dtbaker_@flash.net>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 13 Jul 1998 12:17:52 +0200
From: "The Beals" <yoshiko.beal@munich.netsurf.de>
Subject: "@foo=<*>" missing files on FAT32 partitions?
Message-Id: <35a9de67.0@news.munich.netsurf.de>
aka: Bug in Perl for Win32?
I'm seeing that the following code snippet........
@files = <*>;
foreach $file (@files) {
print $file."\n";
}
..........misses the first file in the list when run on a FAT32 drive under
Win98. When run on an NTFS drive over a network using Win98, or on a FAT16
drive, it gets all file names correctly.
For example, if a dir has the following files:
bar.c
c.java
foo.pl
java.c
the above snippet is missing "bar.c", but has the rest of them. It'll print:
c.java
foo.pl
java.c
Doing:
@files = `dir /b *.*`;
does return the whole list, though.
I've also tries while/for loops to iterate through the array, but no luck.
Is anybody else having the same problem? Does anyone have a solution?
Thanks for your help,
yoshi beal
(yoshiko.beal@munich.netsurf.de)
------------------------------
Date: 13 Jul 1998 10:43:20 GMT
From: tina@scandinaviaonline.se (Tina Marie Holmboe)
Subject: Re: -w on production code
Message-Id: <6ococ8$19b$6@news1.sol.no>
In article <6obn81$4m7$1@srv38s4u.cas.org>,
lvirden@cas.org writes:
> Perhaps in your part of the world this isn't as easy an option as in others,
> but I would consider after your f above my own g:
>
> g) quit that job and find a job elsewhere
>
> Around this part of the world, one would probably pick up an extra $20,000
> a year ...
Then I can only say that I envy you your part of the world; and go back
to try to make a living in *this* part...
Without -w.
--
(t-chan || ka`ira)@DALnet
- TiM
Tina Holmboe <tina@tech.scandinaviaonline.se>
------------------------------
Date: Mon, 13 Jul 1998 11:32:43 GMT
From: miho21@yahoo.com
Subject: a little newbie filehandle question
Message-Id: <6ocr8r$qti$1@nnrp1.dejanews.com>
Hi,
I've been writing in perl for a couple of months, but I'm afraid there's a
filehandle issue i haven't figured out. its a newbie question, so I'm sure
someone can answer it:
say I am writing a log analizer (hypotheticlly speaking off course), and I
need as a first step to slice the log into several files, lets say two, to
make things easier. since I want entries that appear more than once to be
left out, and I want the new file to be sorted, I'd do something like:
open(FILE1,"| sort | uniq >> /mypath/my.log"); # so far so good.
the question is: later in the program I wanna address the same file, this
time for reading, but since the filehandle is piped and redirected, I cannot
use the filehandle, but have to close it, reopen, probably using the same
name, then read. this makes the script all bulky and not very aesthetic.
How can I kill two birds with one rock and avoid this not-very-clean
programming style???
an answer would be greatly appreciated.
Mihoko.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 13 Jul 1998 12:22:51 GMT
From: arch@abts.net (Shaun Sides)
Subject: Re: Arrays
Message-Id: <slrn6qjdcp.825.arch@abts.net>
Quoting The Wildman - in comp.lang.perl.misc you wrote:
> I'm having a little trouble with arrays. Okay, a LOT. I don't understand how
> they work in perl at all. I'm trying to do something like this:
> for ($i = 0;$i < MAX;$i++) {
> $array[$i] = $i;
> }
>
> But of course it isn't working. You can see what my coding background is,
> too, I suppose. :D
Weird that it isn't working for you. I just did
perl -we 'for ($i = 0; $i < 5; $i++) {$array[$i] = $i} print "@array\n"'
and it output
0 1 2 3 4
I even left out the semicolons. ;-)
--
Shaun L. Sides arch@abts.net
Free Randal Schwartz and Ric Flair!
Oxymoron: NT security
------------------------------
Date: Mon, 13 Jul 1998 13:30:53 GMT
From: faganb@my-dejanews.com
Subject: binaries for SCO 3.2v4.2
Message-Id: <6od26d$4l8$1@nnrp1.dejanews.com>
I cannot compile 5.004 on my SCO 3.2v4.2 system. Does any one have a binary?
Thanks.
--Brant Fagan
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Mon, 13 Jul 1998 03:10:17 -0700
From: "Tauren Mills" <tauren@groovee.com>
Subject: Re: Choosing DBMS: friendly to Linux, Apache, Perl, Java
Message-Id: <6ocm9k$rl5$1@news.gstis.net>
Although I've never used it, you might want to check out SOLID. Their
product sounds great. They have great JDBC support (which is what I use),
but I'm not sure about Perl.
http://www.solidtech.com/
gordo@pclink.com wrote in message <6o0p5d$a80$1@nnrp1.dejanews.com>...
>I am just in the process of setting up Apache 1.3 on a small Linux (home
>office) server running RedHat 5.1. I need a database backend for Apache
>and other uses, including Java and CORBA code and data repository. I
>use Perl for most work so it's a plus if there already is a DBD module
>out there for the database.
------------------------------
Date: Mon, 13 Jul 1998 10:59:13 +0200
From: Alberto Brosich <brosich@univ.trieste.it>
Subject: compare arrays
Message-Id: <35A9CC60.FE94EB69@univ.trieste.it>
A stupid question.
How can i compare two arrays other then with a loop?
Alberto Brosich
System Manager
CSIA - University of Trieste
Italy
------------------------------
Date: 13 Jul 1998 11:56:50 +0200
From: Matthias Neeracher <neeri@iis.ee.ethz.ch>
Subject: Re: First meeting of Dallas.pm
Message-Id: <8667h2ul99.fsf@gwaihir.ee.ethz.ch>
Randal Schwartz <merlyn@stonehenge.com> writes:
> >>>>> "Brand" == Brand and Karina Hilton <bkhilton@netcom.com> writes:
>
> Brand> The first meeting of the Dallas Perl Mongers is on:
> Brand> Place: Juan's Cantina, southwest corner of Central
> Brand> Espressway and Belt Line Rd, Richardson.
>
> Yes, it's nice that all the new Perl Monger groups seem to be
> following that fine old tradition established by the prototype PM
> (NY.PM) of holding their meetings in a bar. :-)
Hey, given your business investments, doesn't such a statement represent a
conflict of interest? :-)
Matthias
--
Matthias Neeracher <neeri@iis.ee.ethz.ch> http://www.iis.ee.ethz.ch/~neeri
"I wouldn't recommend sex, drugs or insanity for everyone, but
they've always worked for me." -- Hunter S. Thompson
------------------------------
Date: Mon, 13 Jul 1998 10:55:35 +0100
From: "Matthew Roderick" <mat@icl.net>
Subject: Flow Analsys tools for perl
Message-Id: <35a9d937.0@news1.vip.uk.com>
Hi,
I'm after a tool that will look at a number of perl scripts (cgi) and
modules (.pl &.pm) and analsys what scripts call what functions and what
library modules are included, etc, etc.
Is there such a beast ?
Matt
------------------------------
Date: Mon, 13 Jul 1998 11:47:52 GMT
From: Brent Michalski <perlguy@inlink.com>
Subject: Re: Help with cgi-lib.pl and input text boxes
Message-Id: <35A9F3E8.48CB2735@inlink.com>
If you are talking:
$myval="this is the value";
<INPUT TYPE=TEXT VALUE=$myval>
and you only get "this" it is because you are not quoting it.
Try:
<INPUT TYPE=TEXT VALUE="$myval">
If you meant something else, please clarify your question.
HTH,
BRent
------------------------------
Date: Mon, 13 Jul 1998 14:16:58 GMT
From: bart.mediamind@tornado.be (Bart Lateur)
Subject: Re: Help! MacPerl and STDIN
Message-Id: <35ac15b0.727261@news.tornado.be>
Normand Rivard wrote:
>My question regards STDIN, STDOUT and STDERR. When I try a simple script like :
>
>while (<STDIN>) {
> print "OK" if (/fred/);
>}
>
>MacPerl prompts me with a console window. I expected some sort of file
>open dialog asking me to find the input file, but it seems that MacPerl
>demands STDIN to map on the console and that's all. Am I missing
>something?
Yes, you're missing something. :-) It's called "Unix compatibility".
This is the kind of behaviour that is pretty normal on Unix platforms,
where the most useful thing here is redirection of input/output. If you
don't provide an input, you'll be prompted to type it in.
The kind of behaviour you're after, is something along these lines:
unless(@ARGV) {
@ARGV = MacPerl::Choose("Pick a file");
@ARGV or die "User cancelled";
}
Excuse me, but my Mac isn't switched on at the moment, so I can't check
the exact syntax. But something like this ought to do.
Bart.
------------------------------
Date: Mon, 13 Jul 1998 06:35:46 -0500
From: "Race Zyzy" <rsharpe@ncsa.uiuc.edu>
Subject: how to tell execution vs require
Message-Id: <6ocrab$rbj$1@vixen.cso.uiuc.edu>
I am writing a perl file that I want to be able to be executed
standalone as say:
perlfoo.pl
or included into another file to use a given fcn say:
require "perlfoo.pl";
...
&foosub();
However, I need to be able to tell which has happened inside
the perlfile, perlfoo.pl. Is there a way to tell whether I am being
interpreted from a "require" or from being executed standalone.
I checked but since the calling proc may have args, the existance
of $0_ and @ARGV is not a good test. Also, since I may not have
control over the file namespace testing whether $0_ == "perlfoo.pl"
can't be guarenteed either.
Any of you perl gurus out there have an idea ? I am trying to avoid
having to seperate the 2 functionalities into seperate files that
have to be maintained.
------------------------------
Date: 13 Jul 1998 12:02:08 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: how to tell execution vs require
Message-Id: <6oct00$4vm$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
"Race Zyzy" <rsharpe@ncsa.uiuc.edu> writes:
:I am writing a perl file that I want to be able to be executed
:standalone as say:
: perlfoo.pl
:or included into another file to use a given fcn say:
: require "perlfoo.pl";
: ...
: &foosub();
Are you sure you want to do that? Why would you have a library
file that doubled as a program? Make a proper module in PerlFoo.pm,
and then make a program perlfoo that uses it.
--tom
--
Refer does not rhyme with deafer.
Foeffer does, and zephyr, heifer.
------------------------------
Date: Mon, 13 Jul 1998 09:56:52 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: hypertext links to files in ls output
Message-Id: <35A9CBD4.26EEACEB@nortel.co.uk>
Emmett McLean wrote:
>
> Hi,
>
> Does anyone have an example of a Perl script
> which lists the files in a directory on a UNIX
> machine and adds the text so the filenames
> appear as hypertext links in a html document?
'cor, I've 'xactly that...waddayamean with ls output?
use CGI qw(:standard);
use File::stat;
$layout = CGI -> new();
$cbdir = "/somedir";
$url_path = "http://www.urlpath.bla/to_your_dir/";
opendir(CB,"$cbdir") || die "Cannot opendir:$!";
foreach $file (sort readdir(CB)) {
push (@files, $file);
}
closedir(CB);
splice (@files, 0, 2); #One way to get rid of the dots
print start_html(-title=>'Cookbooks', -BGCOLOR=>'white');
print "<table width=100%>";
print "<tr><td><b>Filename:</b><hr noshade></td>";
print "<td><b>Last modified:</b><hr noshade></td></tr>";
foreach $file (@files) {
$status = stat($cbdir."/".$file) or die "Darn, that didn't work:$!";
$time = localtime($status->mtime);
$file =~ /1401|1415/ ?
print "<tr><td><a href='some.other.url/$file'>",$file,"</a></td>" :
print "<tr><td><a href='$url_path$file'>",$file,"</a></td>";
print "<td>",$time,"</td></tr>";
}
print "</table>";
print end_html;
The script also lists last modified time of the file, and assigns a
different url to files including 1401 and 1415 in their name...
Also, CGI.pm is quite useless in this example, I only use it twice...oh
well.
--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________
------------------------------
Date: Mon, 13 Jul 1998 10:07:34 +0100
From: "Clinton Gormley" <clint@netcomuk.co.ukXX>
Subject: Re: Module installion on Windows 95
Message-Id: <6ociol$p6v$1@taliesin.netcom.net.uk>
Depends on the module. Some of them just need ot be moved to the lib folder
(or a sub-folder thereof). others require a win32 makefile-type package.
dmake? i think?
Often still doesn't work as c-compilers etc are missing
D wrote in message <35a4bb44.0@rapeme.kirov.ru>...
>On UNIX we usually install Perl module with this procedure:
> perl Makefile.PL
> make
> make install
>
>What shall I do on Windows 95?
>
>
------------------------------
Date: 13 Jul 1998 11:45:00 GMT
From: andlin-7@jota.sm.luth.se (Anders Lindgren)
Subject: Pattern matching?
Message-Id: <6ocrvs$g0$1@news.luth.se>
Hello
I have a little problem...
I have a file that looks something like:
#FIX(#TAGG=234:..........)
(there are more stuff in the parentheses, but that's not important
here...)
There are several lines like that and each line starts with at least one
tab, and can have several #FIX(...) things...
What I need to do is to replace the number of the tag with a higher one,
e.g. the line above could become
#FIX(#TAGG=306:..........)
I guess this would be possible to do with pattern matching or some other
way, but I can't figure it out... ne1 got any idea?
TIA
/Anders
------------------------------
Date: Mon, 13 Jul 1998 14:06:37 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: Pattern matching?
Message-Id: <35AA065D.3E2B7E69@nortel.co.uk>
Anders Lindgren wrote:
>
> Hello
> I have a little problem...
> I have a file that looks something like:
> #FIX(#TAGG=234:..........)
> e.g. the line above could become
> #FIX(#TAGG=306:..........)
$_ = '#FIX(#TAGG=234:..........)';
s/#TAGG=\d+/#TAGG=306/;
print $_;
Check the perlre documentation for that. Or, if you want to increment
the number by a specific amount, you could do that:
sub mod { my $numb = shift; return ++$numb; }
$_ = '#FIX(#TAGG=234:..........)';
s/#TAGG=(\d+)/#TAGG=${\&mod($1)}/;
print $_;
Check the perlref documentation and the perlfaq (perlfaq4, how do I
expand function calls in a string?) for this approach.
--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________
------------------------------
Date: Mon, 13 Jul 1998 15:59:12 +0400
From: "Igor A.Klenin" <wer@kbsu.ru>
Subject: Re: perl 5.004.04 on AIX 4.2.1
Message-Id: <35A9F690.A987E38F@kbsu.ru>
Darren Henderson wrote:
>
> I'm having some trouble getting perl 5.004.04 to compile under AIX 4.2.1.
>
> It's comming down to the following.....
>
> AutoSplitting perl library
>
> Making DynaLoader (static)
> gcc -L/usr/local/lib -bE:perl.exp -o perl perlmain.o
> lib/auto/DynaLoad
> er/DynaLoader.a libperl.a `cat ext.libs` -lnsl -ldbm -ldl -lld -lm -lc
> -lbsd -l
> PW
> ld: 0706-005 Cannot find or open file: libgcc.a
> ld:open(): No such file or directory
> ld: 0706-005 Cannot find or open file: libgcc.a
> ld:open(): No such file or directory
> gcc: file path prefix `/usr/local/lib/gcc-lib/E:perl.exp/2.8.1/' never
> used
> make: The error code from the last command is 1.
>
>
> Stop.
>
> This paticular attempt was using gcc 2.8.1. I'm really not sure what to
> make of this. libgcc.a exists and lives in the deafult location. Also note
> the gcc: line toward teh end, the path prefix listed there is incorrect
> (the E:perl.exp should be rs6000-ibm-aix4.2.1.0), the correct value was
> being used up to that point.
>
> Any one have similar problems or thoughts on the possible problem?
Download binary file from www.bull.de/perl*, and install it.
On my AIX PERL from www.bull.de work perfectly. You may download it from
mirror from Russia, ftp://news.kbsu.ru/pub/AIXfreeware .
Igor A.Klenin.
------------------------------
Date: 13 Jul 1998 02:38:17 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: PING / Traceroute Perl Script
Message-Id: <m390lyt7jq.fsf@windlord.Stanford.EDU>
Other people have given you advice on how to get output to show up a line
at a time. I just wanted to point out that...
Jesse Rosenberger <jesse@savalas.com> writes:
> $fqdn = $ENV{'QUERY_STRING'};
[...]
> @result = `$ping_cmd -c$num_times $fqdn`;
...you just gave anyone who can run this CGI script access to the web
server account.
You really want to read man perlsec before you write CGI scripts.
--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: 13 Jul 1998 11:18:08 +0200
From: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: Placing output from System() call into an array from the file that calls it?
Message-Id: <isu34mm7n3.fsf@godzilla.kiere.ericsson.se>
Bryan T Hoch <bth@acsu.buffalo.edu> writes:
> At least that's what I want it to do. Right now, what it does is
> just spit out every single user on $hostA to the screen
perlfaq8, Question: "Why can't I get the output of a command with system()?"
Next time, check the FAQ *before* you post.
--
Calle Dybedahl, UNIX Sysadmin
qdtcall@esavionics.se http://www.lysator.liu.se/~calle/
------------------------------
Date: 13 Jul 1998 10:42:39 GMT
From: c.c.eiftj@98.usenet.us.com (Rahul Dhesi)
Subject: Re: Putting CPAN on a CD: good or not good?
Message-Id: <6ocoav$cbv$1@samba.rahul.net>
Keywords: from just another new york perl hacker
In <comdog-ya02408000R1007981305190001@news.panix.com>
comdog@computerdog.com (brian d foy) writes:
> * CPAN on CD is outdated even before the first copy is burned.
> this is the strongest objection to the undertaking.
The mail software I personally prefer to use, called MH, was last
installed here in September 1995. There are newer versions aplenty, but
the version that was installed in 1995 is still working just fine.
Software does not detriorate with time. If a few months later it's not
worth using, it's because it was never worth using.
If each CD comprises a self-consistent set of programs, and if they are
in working order when the CD is released, then they will continue to
work together just as well in the future.
--
Rahul Dhesi <dhesi@spams.r.us.com>
------------------------------
Date: 13 Jul 1998 11:13:39 +0200
From: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: Reading virtmaps.db with perl
Message-Id: <isww9im7uk.fsf@godzilla.kiere.ericsson.se>
Janning Vygen <vygen@uni-duesseldorf.de> writes:
> Which database format does sendmail use to create those files
Whichever it was compiled to use. You'll have to find that out for the
particular sendmail installtion you have, and then use the
corresponding module for Perl.
--
Calle Dybedahl, UNIX Sysadmin
qdtcall@esavionics.se http://www.lysator.liu.se/~calle/
------------------------------
Date: Mon, 13 Jul 1998 10:56:21 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: s: simple-database
Message-Id: <35A9D9C5.45B1DC2C@nortel.co.uk>
Adam Kopacz wrote:
>
> i search a small 'database' perl script.
> it should write and count some strings to a file.
> the file should look like this:
>
> 128 bla
> 4 xyz
> 2 abc
> 12 uggaa
>
> the script should scan the file for the string and if its not there
> than it should add it and the number 1. if the string comes again then
> the number should be make ++..
>
print "give me a word : ";
$word = <STDIN>; #Get input
chomp $word; #Take away newline
open FILE, "+< /u/quednauf/temp/testfile.txt"; #open for reading and
writing
BLOCK: {
$recall = 0;
while (<FILE>) {
/$word/io && last BLOCK; #word exists->get out
$recall = tell(FILE); #remember where hit was
}
print FILE "1\t$word\n"; #Word wasn't there->print
close FILE;
print "Added word $word\n";
exit; #exit here, work is done
}
seek FILE, $recall, 0; #seek to point of last hit
@remains = <FILE>; #read in file from there
($number, $word) = split /\t/, $remains[0]; #split line where hit was
$remains[0] = join ("\t", ++$number, $word); #join with incremented
number
seek FILE, $recall, 0; #again to point of hit
truncate FILE, $recall; #truncate file to that point
print FILE @remains; #print the array to the file
close FILE; #close it
chomp $word; print "Appearances of $word is now $number\n";
Shorter ways are surely possible, but it works a treat.
The regexp is case insensitive, modify it as you need it.
--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________
------------------------------
Date: Mon, 13 Jul 1998 13:16:15 +0200
From: Adam Kopacz <Adam.K@idnet.de>
Subject: Re: s: simple-database
Message-Id: <v9qco6.k8.ln@news.kLo.de>
F.Quednau <quednauf@nortel.co.uk> wrote:
Hi F.Quednau,
> print "give me a word : ";
..
> Shorter ways are surely possible, but it works a treat.
> The regexp is case insensitive, modify it as you need it.
1000*thanx! :) it works great.
btw, great feature: if "TEST" is in the list and i add "test" then it
is added to TEST :)
--
Adam Kopacz - http://www.idnet.de/~AdamK - ICQ# 257499
------------------------------
Date: Mon, 13 Jul 1998 14:38:40 +0200
From: Adam Kopacz <Adam.K@idnet.de>
Subject: Re: s: simple-database
Message-Id: <g4vco6.f11.ln@news.kLo.de>
F.Quednau <quednauf@nortel.co.uk> wrote:
Hi F.Quednau,
i have a little problem with your script.
it works for "test" and "te st" but not for strings like:
"test [123];(7)" anf i need this because browsers are often using
something :( => "Mozilla/4.05 [en] (X11; I; Linux 2.0.34 i586)"
i think the porblem is here:
> /$word/io && last BLOCK; #word exists->get out
^^
i have read all perl5 faq's but i can't find anything about this..
only /o oder /s+ or so..
--
Adam Kopacz - http://www.idnet.de/~AdamK - ICQ# 257499
------------------------------
Date: Mon, 13 Jul 1998 14:18:58 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: s: simple-database
Message-Id: <35AA0942.E15CF81D@nortel.co.uk>
Adam Kopacz wrote:
>
> i have a little problem with your script.
> it works for "test" and "te st" but not for strings like:
> "test [123];(7)" anf i need this because browsers are often using
> something :( => "Mozilla/4.05 [en] (X11; I; Linux 2.0.34 i586)"
> i think the porblem is here:
>
> > /$word/io && last BLOCK; #word exists->get out
Sorry, I forgot the frikkin' metacharacters like [] and similar.
Modify that line to this:
/\Q$word\E/io && last BLOCK; #word exists->get
out
I think there are nicer ways to quote metacharacters, but that's the one
I found first in the perlre part of the Perl documentation. In there you
will also find what i, o and other modifiers mean (i : insensitive
pattern match, o: compile regexp only once). Read it...
--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________
------------------------------
Date: 13 Jul 1998 09:35:28 GMT
From: mmavani@fir.fbc.com (Manish M Mavani)
Subject: Sybperl (w/ CT-lib)
Message-Id: <6ockd0$ac@jusdnews.fir.fbc.com>
Hi friends,
We have been using Sybperl (Perl 4 + DB lib), as DB lib is fading out and
not going to be supported in future - we would like to create a ~new~
Sybperl ( Perl 4 + CT Lib).
In brief, changing dbopen calls to ct_open. It turns out this is not
very simple thing to do.
Sybperl with CT lib is directly available - but it uses Perl 5. We would
like to avoid migrating to Perl 5, as millions of lines of code is
affected.
Please point us to the proper direction to achieve our goal. Your
expert help will be highly appreciated.
Regards
Manish Mavani
------------------------------
Date: Mon, 13 Jul 1998 12:18:49 +0100
From: "Su Potter" <spotter@remove-to-reply.ms.com>
Subject: VRML linking to Perl
Message-Id: <6ocqet$dlo@sanews1.morgan.com>
I would like to know whether it would be possible to run a perl script on
the server, then to pass on information to a .wrl file so that it changes
according to what the perl script outcome is? Also is there a way to link
perl within the .wrl file such that it can update the VRML world when data
changes in the perl variables?
Also I would like to know how I can create threads in a Perl script?
I realise this is not wholey Perl related and that this might not be
possible, however if there are any ways of getting round this I would like
to hear your suggestions, thanks.
Su
--
email: spotter@ms.com
------------------------------
Date: Mon, 13 Jul 1998 08:27:30 -0500
From: Dan Baker <dtbaker_@flash.net>
Subject: Re: What's the substitute for #! /usr/bin/perl in Win32 Perl?
Message-Id: <35AA0B42.23CA@flash.net>
James Moore wrote:
>
> Newby needs an answer to the following question:
>
> I'm using the ActiveState Win32 Perl on an NT 4.0 system... what do I
> use in place of the first line (#! /usr/bin/perl) in Unix versions of
> the script ?
-----------
I dunno about NT, but in win95 I installed Perl to the c:\usr directory
so that I'd get a "normal" path the same as UNIX and would have the same
#! line. You might want to consider re-installing?
Dan
# If you would like to reply-to directly, remove the _ from my username
* Use of my email address regulated by US Code Title 47,
Sec.227(a)(2)(B) *
------------------------------
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 3139
**************************************