[11325] in Perl-Users-Digest
Perl-Users Digest, Issue: 4925 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Feb 18 07:07:13 1999
Date: Thu, 18 Feb 99 04:00:27 -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, 18 Feb 1999 Volume: 8 Number: 4925
Today's topics:
Re: Anybody get .pl scripts to run on Win32 Perl and Ap <Allan@Due.net>
Re: Calling LOCAL CGI Perl script from web browser - po <Tony.Curtis+usenet@vcpc.univie.ac.at>
Re: DOC: perldelta.pod for 5.005_55 <matthew.sergeant@eml.ericsson.se>
Re: DOC: perldelta.pod for 5.005_55 <tchrist@mox.perl.com>
Re: embedded SQL in perl? <woerdehoff@sdm.de>
Re: export perl variables <Tony.Curtis+usenet@vcpc.univie.ac.at>
Extending perl: Advice needed <daniel.weberhofer@broadnet.ascom.ch>
FAQ 5.10: How can I output my numbers with commas added <perlfaq-suggestions@perl.com>
FAQ 5.11: How can I translate tildes (~) in a filename? <perlfaq-suggestions@perl.com>
FAQ 5.12: How come when I open a file read-write it wip <perlfaq-suggestions@perl.com>
FAQ 5.9: How can I write() into a string? <perlfaq-suggestions@perl.com>
help with search <Natasha@ikoda.demon.co.uk>
Help: Can't build Win32::Process <ibelgaufts@gfc-net.de>
howto read element from string.. <c.m.oudeman@st.hanze.nl>
Re: MASS EMAIL <lowella@666serv.net>
Re: Perl Xbase Module. <ibelgaufts@gfc-net.de>
Re: permissions <Tony.Curtis+usenet@vcpc.univie.ac.at>
Re: Red Haven - Manchester United <r.i.h.powell@rl.ac.uk>
Re: removing blank lines in a multiline string? <ekkis@arix.com>
special signs <anzej@skavt.net>
String concatenation, differences renenyffenegger@my-dejanews.com
Re: String concatenation, differences <Allan@Due.net>
Re: Stumped <23_skidoo@geocities.com>
Re: Stumped <23_skidoo@geocities.com>
Re: WIN32::GUI - Any progress? <ibelgaufts@gfc-net.de>
xemacs support for Perl5 debugger <ofleig@sim3.univ-rennes1.fr>
y2k utility ^___^ <cybaek@pcrc.hongik.ac.kr>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 18 Feb 1999 06:18:39 -0500
From: "Allan M. Due" <Allan@Due.net>
Subject: Re: Anybody get .pl scripts to run on Win32 Perl and Apache 1.3.3. &#$%*Damn MS Windoze file associations.
Message-Id: <AGSy2.151$986.3190@nntp1.nac.net>
Rod MacBain wrote in message <36cb7eff.4040385@allnews.nbnet.nb.ca>...
:Here's the thing - I've had the Win32 apache 1.3.3 server running for
:a while and it serves standard HTML no problem. All my perl scripts
:run fine if I run them from the command line like (perl.exe hello.pl)
:but I can't get seem to get the files to associate properly. Am I
:missing something? I've got the shebang setup properly to
:#!C:\pelr\bin\ and I've done the standard windoze file association
:thing and setup the .pl extension to run with C:\perl\bin\perl.exe %1
:%* as per the activestate documentation but I can't run a perl file
:directly from the explorer. So obviously I can't get anything to run
:by POSTing it input from the server since I can't even get it to
:"hello world" properly by running it from the command line.
Wait above you say the script does run at the command line and now you say it
does not. By explorer do you mean IE? Just clicking on the file within a
browser will not work unless the request is being processed by the server.
:Has
:anybody got the file associations to work properly it a Win95 and
:Perl 5 environment? How do you do it?
If, at the prompt, you type "perl hello.pl" and the script runs correctly then
perl is configured properly correctly. After that, this is a server related
problem so you should post your question in an appropriate newsgroup such as:
comp.infosystems.www.servers.ms-windows
Better yet, search DejaNews because this comes up all the time. Apache does
not come ready to run CGI out of the box, you must change the configuration.
This is documented in the .conf files. Also, the #! line must point to the
directory that contains perl.exe. This is not generally true for the Win32
port of Perl but it is required by Apache.
HTH
AmD
It will not help you in this instance but you might want to check out Running
Apache at www.whitecrow.net RA is a small app that will start and stop Apache
for Windows and minimize it to the task bar. If I ever get back to it, the
plan is to have it set the CGI configuration for the user automatically.
------------------------------
Date: 18 Feb 1999 10:55:27 +0100
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: Calling LOCAL CGI Perl script from web browser - possible?
Message-Id: <831zjo3uk0.fsf@vcpc.univie.ac.at>
Re: Calling LOCAL CGI Perl script from web browser -
possible?, Bill <bakerb@telusplanet.net> said:
Bill> If I open a web page on my C: (hard) drive,
Bill> click on a URL that points to a CGI Perl
Bill> script that also resides on my hard drive,
Bill> will MS Internet Explorer and/or Navigator be
Bill> smart enough to invoke that Perl script and
Bill> return the resulting web page?
Nope. Browsers don't invoke CGI programs, WWW
servers do. So you need a local server. You can
test part-way easily with the CGI.pm module.
hth
tony
--
Tony Curtis, Systems Manager, VCPC, | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien. | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds! | private email:
Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>
------------------------------
Date: Thu, 18 Feb 1999 09:20:11 +0000
From: Matt Sergeant <matthew.sergeant@eml.ericsson.se>
Subject: Re: DOC: perldelta.pod for 5.005_55
Message-Id: <36CBDB4B.E14B24BC@eml.ericsson.se>
Tom Christiansen wrote:
>
> =head1 NAME
>
> perldelta - what's new for perl5.006 (as of 5.005_55)
I don't see anything about Unicode/utf-8 support. I've not been
following p5p lately so I might be unaware of something, but I assumed
that was one of the major changes.
--
<Matt email="msergeant@ndirect.co.uk" />
| Fastnet Software Ltd | Perl in Active Server Pages |
| Perl Consultancy, Web Development | Database Design | XML |
| http://come.to/fastnet | Information Consolidation |
------------------------------
Date: 18 Feb 1999 04:48:35 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: DOC: perldelta.pod for 5.005_55
Message-Id: <36cbfe13@csnews>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
Matt Sergeant <matthew.sergeant@eml.ericsson.se> writes:
:I don't see anything about Unicode/utf-8 support. I've not been
:following p5p lately so I might be unaware of something, but I assumed
:that was one of the major changes.
You're right.
perlfunc.pod:For example, C<chr(65)> is C<"A"> in either ASCII or Unicode, and
perlfunc.pod:chr(0x263a) is a Unicode smiley face (but only within the scope of a
perlfunc.pod:Returns the numeric (ASCII or Unicode) value of the first character of EXPR. If
perlfunc.pod: C An unsigned char value. Only does bytes. See U for Unicode.
perlfunc.pod: U A Unicode character number. Encodes to UTF-8 internally.
perlfunc.pod: # same thing with Unicode circled letters
perlfunc.pod:Under Unicode (C<use utf8>) it uses the standard Unicode uppercase mappings. (It
perlfunc.pod:in uppercase (titlecase in Unicode). This is
perlop.pod: tr/\0-\xFF//CU; # translate Latin-1 to Unicode
perlop.pod: tr/\0-\x{FF}//UC; # translate Unicode to Latin-1
perlre.pod: \x{263a} wide hex char (Unicode SMILEY)
perlre.pod: \X Match eXtended Unicode "combining character sequence",
perltodo.pod:=head2 Unicode tutorial
perltodo.pod:Unicode support that Larry has created.
And here's the utf8.pm pragma. Three's also a utf8_heavy as well.
--tom
package utf8;
sub import {
$^H |= 0x00000008;
$enc{caller()} = $_[1] if $_[1];
}
sub unimport {
$^H &= ~0x00000008;
}
sub AUTOLOAD {
require "utf8_heavy.pl";
goto &$AUTOLOAD;
}
1;
__END__
=head1 NAME
utf8 - Perl pragma to turn on UTF-8 and Unicode support
=head1 SYNOPSIS
use utf8;
no utf8;
=head1 DESCRIPTION
The utf8 pragma tells Perl to use UTF-8 as its internal string
representation for the rest of the enclosing block. (The "no utf8"
pragma tells Perl to switch back to ordinary byte-oriented processing
for the rest of the enclosing block.) Under utf8, many operations that
formerly operated on bytes change to operating on characters. For
ASCII data this makes no difference, because UTF-8 stores ASCII in
single bytes, but for any character greater than C<chr(127)>, the
character is stored in a sequence of two or more bytes, all of which
have the high bit set. But by and large, the user need not worry about
this, because the utf8 pragma hides it from the user. A character
under utf8 is logically just a number ranging from 0 to 2**32 or so.
Larger characters encode to longer sequences of bytes, but again, this
is hidden.
Use of the utf8 pragma has the following effects:
=over 4
=item *
Strings and patterns may contain characters that have an ordinal value
larger than 255. Presuming you use a Unicode editor to edit your
program, these will typically occur directly within the literal strings
as UTF-8 characters, but you can also specify a particular character
with an extension of the C<\x> notation. UTF-8 characters are
specified by putting the hexadecimal code within curlies after the
C<\x>. For instance, a Unicode smiley face is C<\x{263A}>. A
character in the Latin-1 range (128..255) should be written C<\x{ab}>
rather than C<\xab>, since the former will turn into a two-byte UTF-8
code, while the latter will continue to be interpreted as generating a
8-bit byte rather than a character. In fact, if -w is turned on, it will
produce a warning that you might be generating invalid UTF-8.
=item *
Identifiers within the Perl script may contain Unicode alphanumeric
characters, including ideographs. (You are currently on your own when
it comes to using the canonical forms of characters--Perl doesn't (yet)
attempt to canonicalize variable names for you.)
=item *
Regular expressions match characters instead of bytes. For instance,
"." matches a character instead of a byte. (However, the C<\C> pattern
is provided to force a match a single byte ("C<char>" in C, hence
C<\C>).)
=item *
Character classes in regular expressions match characters instead of
bytes, and match against the character properties specified in the
Unicode properties database. So C<\w> can be used to match an ideograph,
for instance.
=item *
Named Unicode properties and block ranges make be used as character
classes via the new C<\p{}> (matches property) and C<\P{}> (doesn't
match property) constructs. For instance, C<\p{Lu}> matches any
character with the Unicode uppercase property, while C<\p{M}> matches
any mark character. Single letter properties may omit the brackets, so
that can be written C<\pM> also. Many predefined character classes are
available, such as C<\p{IsMirrored}> and C<\p{InTibetan}>.
=item *
The special pattern C<\X> match matches any extended Unicode sequence
(a "combining character sequence" in Standardese), where the first
character is a base character and subsequent characters are mark
characters that apply to the base character. It is equivalent to
C<(?:\PM\pM*)>.
=item *
The C<tr///> operator translates characters instead of bytes. It can also
be forced to translate between 8-bit codes and UTF-8 regardless of the
surrounding utf8 state. For instance, if you know your input in Latin-1,
you can say:
use utf8;
while (<>) {
tr/\0-\xff//CU; # latin1 char to utf8
...
}
Similarly you could translate your output with
tr/\0-\x{ff}//UC; # utf8 to latin1 char
No, C<s///> doesn't take /U or /C (yet?).
=item *
Case translation operators use the Unicode case translation tables.
Note that C<uc()> translates to uppercase, while C<ucfirst> translates
to titlecase (for languages that make the distinction). Naturally
the corresponding backslash sequences have the same semantics.
=item *
Most operators that deal with positions or lengths in the string will
automatically switch to using character positions, including C<chop()>,
C<substr()>, C<pos()>, C<index()>, C<rindex()>, C<sprintf()>,
C<write()>, and C<length()>. Operators that specifically don't switch
include C<vec()>, C<pack()>, and C<unpack()>. Operators that really
don't care include C<chomp()>, as well as any other operator that
treats a string as a bucket of bits, such as C<sort()>, and the
operators dealing with filenames.
=item *
The C<pack()>/C<unpack()> letters "C<c>" and "C<C>" do I<not> change,
since they're often used for byte-oriented formats. (Again, think
"C<char>" in the C language.) However, there is a new "C<U>" specifier
that will convert between UTF-8 characters and integers. (It works
outside of the utf8 pragma too.)
=item *
The C<chr()> and C<ord()> functions work on characters. This is like
C<pack("U")> and C<unpack("U")>, not like C<pack("C")> and
C<unpack("C")>. In fact, the latter are how you now emulate
byte-oriented C<chr()> and C<ord()> under utf8.
=item *
And finally, C<scalar reverse()> reverses by character rather than by byte.
=back
=head1 CAVEATS
As of yet, there is no method for automatically coercing input and
output to some encoding other than UTF-8. This is planned in the near
future, however.
In any event, you'll need to keep track of whether interfaces to other
modules expect UTF-8 data or something else. The utf8 pragma does not
magically mark strings for you in order to remember their encoding, nor
will any automatic coercion happen (other than that eventually planned
for I/O). If you want such automatic coercion, you can build yourself
a set of pretty object-oriented modules. Expect it to run considerably
slower than than this low-level support.
Use of locales with utf8 may lead to odd results. Currently there is
some attempt to apply 8-bit locale info to characters in the range
0..255, but this is demonstrably incorrect for locales that use
characters above that range (when mapped into Unicode). It will also
tend to run slower. Avoidance of locales is strongly encouraged.
=cut
--
Welcome to Microsoft!
Plase set your watch back 20 years.
------------------------------
Date: Thu, 18 Feb 1999 11:55:19 +0100
From: Hendrik =?iso-8859-1?Q?W=F6rdehoff?= <woerdehoff@sdm.de>
Subject: Re: embedded SQL in perl?
Message-Id: <36CBF197.DFF0BCFC@sdm.de>
Eric Bohlman schrieb:
>
> amanda.leaman@atl.bluecross.ca wrote:
> : We currently have c programs running on Unix that have embedded sql for
> : querying our Oracle database. I would like to start programming this stuff
> : in perl and am looking for documentation/examples of SQl embedded in perl.
> : Is it the same as in c?
>
> Not quite. Take a look at the documentation for DBI and DBD::Oracle.
You cannot use embedded SQL in Perl.
Perl database modules all use the call level interface provided by the
various databases. The module DBI and the DBD:... modules provide an
abstraction to these call level interfaces.
You will end up using dynamic SQL with all its advantages and
disadvantages (especially the performance penalties and the security
problems). But since you are considering switching from compiled C to
interpreted Perl anyway performance doesn't seem to be an issue in your
case.
Yours
Hendrik
Pursuant to US Code, Title 47, Chapter 5, Subchapter II, Sec. 227,
any and all unsolicited commercial E-mail sent to this address
is subject to a download and archival fee in the amount of $500
US (per infraction). E-mailing denotes acceptance of these terms.
--
Hendrik W"ordehoff |s |d &|m | software design & management
| | | | GmbH & Co. KG :
woerdehoff@sdm.de | | | | Thomas-Dehler-Str. 27 >B)
Tel/Fax (089) 63812-337/515 81737 M"unchen :
------------------------------
Date: 18 Feb 1999 10:57:21 +0100
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: export perl variables
Message-Id: <83zp6c2fwe.fsf@vcpc.univie.ac.at>
Re: export perl variables, George
<georgeb@xylan.com> said:
George> This is a multi-part message in MIME format.
George> --------------B438BCA84BD6872A5DC107A3
George> Content-Type: multipart/alternative;
George> boundary="------------257EEDF1D162831753CE8146"
Please don't post HTML to USENET, this is a text
medium. Nor the vcard stuff...
George> Hello, I have a question about perl. I have
George> a perl script which calls bourne shell
George> scripts. I want to export variables from
George> the perl to the bourne shell scripts
perldoc perlvar
%ENV $ENV{expr}
The hash %ENV contains your current environment.
Setting a value in ENV changes the environment for
child processes.
hth
tony
--
Tony Curtis, Systems Manager, VCPC, | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien. | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds! | private email:
Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>
------------------------------
Date: Thu, 18 Feb 1999 08:51:14 +0100
From: "daniel weberhofer" <daniel.weberhofer@broadnet.ascom.ch>
Subject: Extending perl: Advice needed
Message-Id: <7agk5f$m22$1@ascomax.hasler.ascom.ch>
Hi,
I want to extend perl with a yacc based HDL (hardware description language)
parser in C and
to build part of the parse tree in perl (I can't use pbyacc). So I studied
perlxs,
perlxstut, perlcall, the xs cookbook from Dean Roedrich and the examples in
the the
advance perl programming book. I think I have an idea how I can invoke the C
parser
from perl and how to call perl functions from C.
How do I have to modify Makefile.pl generated by h2xs that all my *.c are
compiled
and linked togenether with the perl extension? I read the MakeMaker
documentation
but did not see how I could do what i need.
How do I have to modify Makefile.pl so that yacc MAKES first the *.c and *.h
files out of
the grammar file *.y before the *.c files are compiled and linked?
Does anybody has advice, pointers or examples?
Thanks
Daniel
------------------------------
Date: 18 Feb 1999 02:28:57 -0700
From: Tom Christiansen <perlfaq-suggestions@perl.com>
Subject: FAQ 5.10: How can I output my numbers with commas added?
Message-Id: <36cbdd59@csnews>
(This excerpt from perlfaq5 - Files and Formats
($Revision: 1.34 $, $Date: 1999/01/08 05:46:13 $)
part of the standard set of documentation included with every
valid Perl distribution, like the one on your system.
See also http://language.perl.com/newdocs/pod/perlfaq5.html
if your negligent system adminstrator has been remiss in his duties.)
How can I output my numbers with commas added?
This one will do it for you:
sub commify {
local $_ = shift;
1 while s/^([-+]?\d+)(\d{3})/$1,$2/;
return $_;
}
$n = 23659019423.2331;
print "GOT: ", commify($n), "\n";
GOT: 23,659,019,423.2331
You can't just:
s/^([-+]?\d+)(\d{3})/$1,$2/g;
because you have to put the comma in and then recalculate your position.
Alternatively, this commifies all numbers in a line regardless of
whether they have decimal portions, are preceded by + or -, or whatever:
# from Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
sub commify {
my $input = shift;
$input = reverse $input;
$input =~ s<(\d\d\d)(?=\d)(?!\d*\.)><$1,>g;
return scalar reverse $input;
}
--
I think I'm likely to be certified before Perl is... :-)
--Larry Wall in <1995Feb12.061604.6008@netlabs.com>
------------------------------
Date: 18 Feb 1999 03:29:04 -0700
From: Tom Christiansen <perlfaq-suggestions@perl.com>
Subject: FAQ 5.11: How can I translate tildes (~) in a filename?
Message-Id: <36cbeb70@csnews>
(This excerpt from perlfaq5 - Files and Formats
($Revision: 1.34 $, $Date: 1999/01/08 05:46:13 $)
part of the standard set of documentation included with every
valid Perl distribution, like the one on your system.
See also http://language.perl.com/newdocs/pod/perlfaq5.html
if your negligent system adminstrator has been remiss in his duties.)
How can I translate tildes (~) in a filename?
Use the <> (glob()) operator, documented in the perlfunc manpage. This
requires that you have a shell installed that groks tildes, meaning csh
or tcsh or (some versions of) ksh, and thus may have portability
problems. The Glob::KGlob module (available from CPAN) gives more
portable glob functionality.
Within Perl, you may use this directly:
$filename =~ s{
^ ~ # find a leading tilde
( # save this in $1
[^/] # a non-slash character
* # repeated 0 or more times (0 means me)
)
}{
$1
? (getpwnam($1))[7]
: ( $ENV{HOME} || $ENV{LOGDIR} )
}ex;
--
"A pithy saying is worth its weight in gold." --Larry Wall
------------------------------
Date: 18 Feb 1999 04:29:17 -0700
From: Tom Christiansen <perlfaq-suggestions@perl.com>
Subject: FAQ 5.12: How come when I open a file read-write it wipes it out?
Message-Id: <36cbf98d@csnews>
(This excerpt from perlfaq5 - Files and Formats
($Revision: 1.34 $, $Date: 1999/01/08 05:46:13 $)
part of the standard set of documentation included with every
valid Perl distribution, like the one on your system.
See also http://language.perl.com/newdocs/pod/perlfaq5.html
if your negligent system adminstrator has been remiss in his duties.)
How come when I open a file read-write it wipes it out?
Because you're using something like this, which truncates the file and
*then* gives you read-write access:
open(FH, "+> /path/name"); # WRONG (almost always)
Whoops. You should instead use this, which will fail if the file doesn't
exist. Using ">" always clobbers or creates. Using "<" never does
either. The "+" doesn't change this.
Here are examples of many kinds of file opens. Those using sysopen() all
assume
use Fcntl;
To open file for reading:
open(FH, "< $path") || die $!;
sysopen(FH, $path, O_RDONLY) || die $!;
To open file for writing, create new file if needed or else truncate old
file:
open(FH, "> $path") || die $!;
sysopen(FH, $path, O_WRONLY|O_TRUNC|O_CREAT) || die $!;
sysopen(FH, $path, O_WRONLY|O_TRUNC|O_CREAT, 0666) || die $!;
To open file for writing, create new file, file must not exist:
sysopen(FH, $path, O_WRONLY|O_EXCL|O_CREAT) || die $!;
sysopen(FH, $path, O_WRONLY|O_EXCL|O_CREAT, 0666) || die $!;
To open file for appending, create if necessary:
open(FH, ">> $path") || die $!;
sysopen(FH, $path, O_WRONLY|O_APPEND|O_CREAT) || die $!;
sysopen(FH, $path, O_WRONLY|O_APPEND|O_CREAT, 0666) || die $!;
To open file for appending, file must exist:
sysopen(FH, $path, O_WRONLY|O_APPEND) || die $!;
To open file for update, file must exist:
open(FH, "+< $path") || die $!;
sysopen(FH, $path, O_RDWR) || die $!;
To open file for update, create file if necessary:
sysopen(FH, $path, O_RDWR|O_CREAT) || die $!;
sysopen(FH, $path, O_RDWR|O_CREAT, 0666) || die $!;
To open file for update, file must not exist:
sysopen(FH, $path, O_RDWR|O_EXCL|O_CREAT) || die $!;
sysopen(FH, $path, O_RDWR|O_EXCL|O_CREAT, 0666) || die $!;
To open a file without blocking, creating if necessary:
sysopen(FH, "/tmp/somefile", O_WRONLY|O_NDELAY|O_CREAT)
or die "can't open /tmp/somefile: $!":
Be warned that neither creation nor deletion of files is guaranteed to
be an atomic operation over NFS. That is, two processes might both
successful create or unlink the same file! Therefore O_EXCL isn't so
exclusive as you might wish.
See also the new the perlopentut manpage if you have it (new for 5.006).
--
There's some side effect based on the fact that SIGCHLD isn't sent by
anyone, but is fabricated by the kernel when a child dies. It's a huge
kludge. But then, it _is_ SysV. --Chip Salzenberg, aka <chs@nando.net>
------------------------------
Date: 18 Feb 1999 01:28:55 -0700
From: Tom Christiansen <perlfaq-suggestions@perl.com>
Subject: FAQ 5.9: How can I write() into a string?
Message-Id: <36cbcf47@csnews>
(This excerpt from perlfaq5 - Files and Formats
($Revision: 1.34 $, $Date: 1999/01/08 05:46:13 $)
part of the standard set of documentation included with every
valid Perl distribution, like the one on your system.
See also http://language.perl.com/newdocs/pod/perlfaq5.html
if your negligent system adminstrator has been remiss in his duties.)
How can I write() into a string?
See the section on "Accessing Formatting Internals" in the perlform
manpage for an swrite() function.
--
In general, they do what you want, unless you want consistency.
--Larry Wall in the perl man page
------------------------------
Date: Thu, 18 Feb 1999 11:14:11 GMT
From: "Natasha Boyd-Stevenson" <Natasha@ikoda.demon.co.uk>
Subject: help with search
Message-Id: <01be5b2f$a283f4e0$8301000a@Ikoda_nts-1.ikoda>
I have a copy of Matts Simple Search script that works fine for our site.
I am quite new to Perl and I would like to change the script so that when
you look at one of the resulting pages, the search term is in bold.
Can anyone help me with this?
Thanks
Natasha
------------------------------
Date: Thu, 18 Feb 1999 11:42:39 +0100
From: "J|rgen Ibelgaufts" <ibelgaufts@gfc-net.de>
Subject: Help: Can't build Win32::Process
Message-Id: <36CBEE9F.EA3D1EB1@gfc-net.de>
Hi,
I am trying to build the Process module of libwin32-0.14. I have Windows NT, MS
Visual C++ Version 5.0 and dmake. I have previously built perl 5.005, Tk 8.0 and
most of the libwin-extensions with success, but building the process module ends
like this:
link -out:blib\arch\auto\Win32\Process\Process.dll -dll -nologo -nodefaultlib
-release -machine:x86 Process.obj F:\perl\5.005\lib\
MSWin32-x86-thread\CORE\perl.lib oldnames.lib kernel32.lib comdlg32.lib
winspool.lib gdi32.lib advapi32.lib user32.lib shell32.lib n
etapi32.lib ole32.lib oleaut32.lib uuid.lib wsock32.lib mpr.lib winmm.lib
version.lib msvcrt.lib odbc32.lib odbccp32.lib -def:Proces
s.def
LINK : warning LNK4012: invalid value "x86", must be IX86, MIPS, or M68K; option
ignored
Creating library blib\arch\auto\Win32\Process\Process.lib and object
blib\arch\auto\Win32\Process\Process.exp ...
Process.obj : error LNK2001: unresolved external symbol
"__imp__SetProcessAffinityMask@8"
blib\arch\auto\Win32\Process\Process.dll : error LNK1120: 1 unresolved externals
dmake.exe: Error code 24, while making 'blib\arch\auto\Win32\Process\Process.dll'
Thank you for any suggestions.
Juergen Ibelgaufts
------------------------------
Date: Thu, 18 Feb 1999 11:49:38 +0100
From: Chris Oudeman <c.m.oudeman@st.hanze.nl>
Subject: howto read element from string..
Message-Id: <36CBF042.1F014083@st.hanze.nl>
Its a simple prob but can't seem to find a solution.
How to read an element from a string
$string="Chris"
->
$element1=C
$element2=h
$element3=r
etc, etc.
Thanks in advance,
Chris Oudeman.
------------------------------
Date: Thu, 18 Feb 1999 02:36:05 -0800
From: L Anderson <lowella@666serv.net>
Subject: Re: MASS EMAIL
Message-Id: <36CBED15.7BD3@666serv.net>
Christopher Pieper wrote:
>
> Ok so I have a task of send 3000 or so people one email. Now I have found
> that my best bet is to use a perl script and the sendmail function. is this
> sound?
>
> Chris
I believe the words immortalized by Dirty Harry are something like "Make
my day, Fuckwad!"--get the drift?
PS Do you know what "LART" means?
PPS Don't give up your day job!
Regards,
LA -- Spummeler -- Munge mark 666
------------------------------
Date: Thu, 18 Feb 1999 10:18:39 +0100
From: "J|rgen Ibelgaufts" <ibelgaufts@gfc-net.de>
Subject: Re: Perl Xbase Module.
Message-Id: <36CBDAEF.695D9944@gfc-net.de>
Hi,
if someone bothers to cope with perl on Windows NT, using DBD::ODBC or Win32::ODBC
is the appropriate answer. The ODBC engine can create and use XBase index files as
well.
Juergen Ibelgaufts
----------------------------------------------------------------------
pvdkamer@inter.NL.net schrieb:
>
> Honza Pazdziora is right and i qoute from the DBD:XBase CPAN archive :
> ==============
> The support for ndx/ntx index files is rather minimal. It currently
> allows you to search directly to the record you want, in the XBase
> module. But you cannot create the index, nor is the index updated when
> you change the dbf. Check the eg/ directory for how you can help to
> make it better.
> ================
> Does anyone have experience with DBD:Xbase ? Does it work OK ?
> Is it fast ?
>
> Thanks for replying
>
> On Mon, 15 Feb 1999 18:52:49 GMT, adelton@fi.muni.cz (Honza Pazdziora)
> wrote:
>
> >On 15 Feb 1999 11:25:23 -0500, Clay Irving <clay@panix.com> wrote:
> >> In <36c83c01.18453387@news.wxs.nl> pvdkamer@inter.NL.net writes:
> >>
> >> >Does anyone know a good Perl-Xbase lib. One that can create and
> >> >maintain dbf's and indexes ?
> >>
> >> Like DBD:XBase?
> >
> >Well, DBD::XBase doesn't maintain indexes. Having said that, I do not
> >know about any other Perl solution that would maintain the indexes for
> >you.
> >
> >--
> >------------------------------------------------------------------------
> > Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
> > make vmlinux.exe -- SGI Visual Workstation Howto
> >------------------------------------------------------------------------
------------------------------
Date: 18 Feb 1999 10:07:23 +0100
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: permissions
Message-Id: <83k8xghygk.fsf@vcpc.univie.ac.at>
Re: permissions, JJ <webdude@mcminn.net> said:
JJ> I am running a perl script that writes a data
JJ> file to a dir on a unix server..when it does it
JJ> it only gives read,write permissions to the
JJ> owner and none to the group and world so when I
JJ> try to access the data file it says that I dont
JJ> have permission to view it..does anyone know how
JJ> to either fix that or add some script that will
JJ> change the permission when it is written?
This is a question to do with UNIX permissions and
site policy, nothing to do with perl really.
Try the comp.unix.questions FAQ at
http://www.faqs.org/
hth
tony
--
Tony Curtis, Systems Manager, VCPC, | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien. | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds! | private email:
Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>
------------------------------
Date: Thu, 18 Feb 1999 11:06:57 +0000
From: Rosemary I H Powell <r.i.h.powell@rl.ac.uk>
Subject: Re: Red Haven - Manchester United
Message-Id: <36CBF451.EFED3CB5@rl.ac.uk>
Naaah jonathan! Just say Manchester City :-)
Rosemary
Jonathan Stowe wrote:
>
> On Thu, 11 Feb 1999 18:17:46 +0800 Linus Koh wrote:
> > Do visit my new Manchester United site
> > http://web.singnet.com.sg/~jopaloli/mufc.htm
> >
>
> I dont think so - if you'd done some research you'd have discovered
> that we're all 'Palace supporters ...
>
> /J\
> --
> Jonathan Stowe <jns@btinternet.com>
> Some of your questions answered:
> <URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
> Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Thu, 18 Feb 1999 00:56:37 -0800
From: "Ekkis" <ekkis@arix.com>
Subject: Re: removing blank lines in a multiline string?
Message-Id: <tAQy2.7419$bP2.55738@typhoon-sf.pbi.net>
duh! one sometimes forgets about the little simple-minded functions. how
cool, thx!
- e
Uri Guttman wrote in message <39r9rque03.fsf@ibnets.com>...
>>>>>> "JG" == Jay Glascoe <jglascoe@giss.nasa.gov> writes:
>
> JG> @s = split /\n+/, $s;
> JG> print join '\n', @s;
>
> JG> $s =~ s#\n+#\n#g;
> JG> $s =~ s#^\n##g;
> JG> $s =~ s#\n$##g;
>
>just do it the easy way:
>
> $s =~ tr/\n//s ;
>
>hth,
>
>uri
>
>--
>Uri Guttman Hacking Perl for Ironbridge
Networks
>uri@sysarch.com uri@ironbridgenetworks.com
------------------------------
Date: Thu, 18 Feb 1999 09:40:12 +0100
From: "Anzej Becan" <anzej@skavt.net>
Subject: special signs
Message-Id: <7agjm2$r99$1@strelovod.uni-mb.si>
I have database (it works with perl) with names, email and other addresses -
http://imenik.skavt.net . I come from Central Europe (Slovenija) where we
use special signs in our names - e.g. German tsch is at us 9 (s vith sign on
the top).
PROBLEM:
I have problem when I want to search for words which begin or end with this
special sign. Any sugest?
Thanks!
Anzej Becan, Slovenia
------------------------------
Date: Thu, 18 Feb 1999 09:29:07 GMT
From: renenyffenegger@my-dejanews.com
Subject: String concatenation, differences
Message-Id: <7agmgr$sk2$1@nnrp1.dejanews.com>
Hi all
Does it make any difference (in terms of speed)
between the following to string
concatenations:
$newString = $oldFirst.$oldLast;
and
$newString = "$oldFirst$oldLast";
Rene
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 18 Feb 1999 06:22:39 -0500
From: "Allan M. Due" <Allan@Due.net>
Subject: Re: String concatenation, differences
Message-Id: <iKSy2.152$986.3172@nntp1.nac.net>
renenyffenegger@my-dejanews.com wrote in message
<7agmgr$sk2$1@nnrp1.dejanews.com>...
:Hi all
:Does it make any difference (in terms of speed)
:between the following to string
:concatenations:
:$newString = $oldFirst.$oldLast;
:and
:$newString = "$oldFirst$oldLast";
perldoc Benchmark
Eating - Fishing - yada yada yada
HTH
AmD
------------------------------
Date: Thu, 18 Feb 1999 10:25:59 +0000
From: 23_skidoo <23_skidoo@geocities.com>
Subject: Re: Stumped
Message-Id: <36CBEAB3.79F7@geocities.com>
Justin Saul wrote:
>
> I fixed earlier problems by moving around code and testing...which is what
> you should do. Although it should have worked...oh well.
>
> Here is my new problem that I REALLY cant solve on my own. The error:
>
> Syntax Error line 52, near "TABLE>"
> Unterminated <> operator at line 55.
>
> Here are lines ~10-60. The rest of the code does not effect this
> section..trust me.
>
> ###CODE STARTS NOW###
>
> if ($form_data{'action'} eq "add" || $ENV{'REQUEST_METHOD'} eq "GET")
> {
>
> # Print out the form
>
> print <<" end_of_html";
> <HTML><HEAD><TITLE>Download Administration</TITLE></HEAD>
> <BODY>
> .
> .
> .
> </HTML>
> end_of_html
> exit;
> }
i ran this through mac perl, aside from the trailing } which i assume is
opened in a part of the script you didn't post, there are 4 spaces
before end_of_html at the top but only 3 at the bottom. they have to
match exactly which is why it's often a good idea not to have any
whitespace at all. however if you're going to do it for the sake of
indentation, be precise!
when i corrected that, it all ran perfectly.
-23
------------------------------
Date: Thu, 18 Feb 1999 10:28:47 +0000
From: 23_skidoo <23_skidoo@geocities.com>
Subject: Re: Stumped
Message-Id: <36CBEB5B.4A02@geocities.com>
23_skidoo wrote:
>
> Justin Saul wrote:
> >
> > I fixed earlier problems by moving around code and testing...which is what
> > you should do. Although it should have worked...oh well.
> >
> > Here is my new problem that I REALLY cant solve on my own. The error:
> >
> > Syntax Error line 52, near "TABLE>"
> > Unterminated <> operator at line 55.
> >
> > Here are lines ~10-60. The rest of the code does not effect this
> > section..trust me.
> >
> > ###CODE STARTS NOW###
> >
> > if ($form_data{'action'} eq "add" || $ENV{'REQUEST_METHOD'} eq "GET")
> > {
> >
> > # Print out the form
> >
> > print <<" end_of_html";
> > <HTML><HEAD><TITLE>Download Administration</TITLE></HEAD>
> > <BODY>
> > .
> > .
> > .
> > </HTML>
> > end_of_html
> > exit;
> > }
>
> i ran this through mac perl, aside from the trailing } which i assume is
> opened in a part of the script you didn't post,
*blush* ignore that, i just didn't cut + paste enough of what you did
post, sorry :)
>there are 4 spaces
> before end_of_html at the top but only 3 at the bottom. they have to
> match exactly which is why it's often a good idea not to have any
> whitespace at all. however if you're going to do it for the sake of
> indentation, be precise!
>
> when i corrected that, it all ran perfectly.
>
> -23
------------------------------
Date: Thu, 18 Feb 1999 10:21:33 +0100
From: "J|rgen Ibelgaufts" <ibelgaufts@gfc-net.de>
Subject: Re: WIN32::GUI - Any progress?
Message-Id: <36CBDB9D.BB8C6780@gfc-net.de>
Ever tried Tk?
Juergen Ibelgaufts
-------------------------------------------------------------------
David Hiltz schrieb:
>
> Anybody know when a new version of Win32::GUI will be updated?
>
> Thanks
>
> -David Hiltz
------------------------------
Date: Thu, 18 Feb 1999 11:38:26 +0100
From: Oliver Fleig <ofleig@sim3.univ-rennes1.fr>
Subject: xemacs support for Perl5 debugger
Message-Id: <36CBED9E.39D30425@sim3.univ-rennes1.fr>
--------------EBD788DA6B69371825423C59
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Hello!
I cannot find any documentation how to get perl in debug mode (-d) work
together with xemacs.
I loaded the lisp function and the editing features work fine.
I have to admit that I don't know what to do with the 'ptags' file in
perls ./emacs directory.
I am running xemacs 20.0 and perl 5.00502 on Sun Solaris.
Cheers
Oliver
------------------------------------------------------------------------
Dipl.-Ing. Oliver Fleig
Laboratoire SIM
Facult=E9 de M=E9decine tel +33 2 99 33 68 63
Univ=E9rsit=E9 de Rennes 1 fax +33 2 99 33 68 88
2 Av. du Pr. L=E9on Bernard ofleig@univ-rennes1.fr
F-35043 RENNES Cedex http://sim3.univ-rennes1.fr
--------------EBD788DA6B69371825423C59
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<HTML>
Hello!
<BR>I cannot find any documentation how to get perl in debug mode (-d)
work together with xemacs.
<BR>I loaded the lisp function and the editing features work fine.
<BR>I have to admit that I don't know what to do with the 'ptags' file
in perls ./emacs directory.
<BR>I am running xemacs 20.0 and perl 5.00502 on Sun Solaris.
<BR>
<P>Cheers
<P>Oliver
<BR>
<P>
<HR WIDTH="100%"><B>Dipl.-Ing. Oliver Fleig</B>
<ADDRESS>
<B>Laboratoire SIM</B></ADDRESS>
<TABLE BORDER=0 CELLSPACING=30 NOSAVE >
<TR VALIGN=TOP NOSAVE>
<TD NOSAVE>
<ADDRESS>
Faculté de Médecine</ADDRESS>
<ADDRESS>
Univérsité de Rennes 1</ADDRESS>
<ADDRESS>
2 Av. du Pr. Léon Bernard</ADDRESS>
<ADDRESS>
F-35043 RENNES Cedex</ADDRESS>
</TD>
<TD NOSAVE>
<ADDRESS>
tel +33 2 99 33 68 63</ADDRESS>
<ADDRESS>
fax +33 2 99 33 68 88</ADDRESS>
<ADDRESS>
<A HREF="mailto:ofleig@univ.rennes1.fr">ofleig@univ-rennes1.fr</A></ADDRESS>
<ADDRESS>
<A HREF="http://sim3.univ-rennes1.fr">http://sim3.univ-rennes1.fr</A></ADDRESS>
<BR> </TD>
</TR>
</TABLE>
<P> </HTML>
--------------EBD788DA6B69371825423C59--
------------------------------
Date: Thu, 18 Feb 1999 14:12:02 +0900
From: "Joshua Chang-Yol Baek" <cybaek@pcrc.hongik.ac.kr>
Subject: y2k utility ^___^
Message-Id: <UmVPyxvW#GA.240@news4.netsgo.com>
#!perl
# All rights left.
# cybaek@pcrc.hongik.ac.kr
# 1999.2.18
if (length($ARGV[0]) == 0)
{
print "Usage : perl y2k.pl <source program>\n";
exit;
}
open(IN, "<$ARGV[0]");
while(<IN>)
{
s/y/k/g;
print;
}
close(IN);
sorry ^^;;
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 4925
**************************************