[23470] in Perl-Users-Digest
Perl-Users Digest, Issue: 5684 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Oct 20 09:05:44 2003
Date: Mon, 20 Oct 2003 06:05:12 -0700 (PDT)
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, 20 Oct 2003 Volume: 10 Number: 5684
Today's topics:
Displaying variables-list <primergy@t-online.de>
Re: Displaying variables-list <andy@shitov.ru>
Re: Displaying variables-list <noreply@gunnar.cc>
Re: Displaying variables-list <djo@pacifier.com>
Re: Displaying variables-list (Tad McClellan)
Re: How do I make a standalone WIN32 executable from Pe <barbr-en@online.no>
Re: HTML whitespace/commnets cruncher (Tad McClellan)
Re: my first perl script! <tassilo.parseval@rwth-aachen.de>
Re: my first perl script! <pasdespam_desmond@zeouane.org>
Re: my first perl script! <tassilo.parseval@rwth-aachen.de>
Re: my first perl script! <sdfg@sdg.com>
Re: my first perl script! (Tad McClellan)
Re: Newbie dumb but quick question <bart.lateur@pandora.be>
Re: Newbie dumb but quick question <bart.lateur@pandora.be>
Re: Newbie dumb but quick question <syscjm@gwu.edu>
Re: Perl security guru needed for a quick, 2 hr, job. (Tad McClellan)
Re: really hard regex ;( (Thomas)
Re: retrieving info from file (Tad McClellan)
Re: Rookie: Constructing a large SQL INSERT statement <sdfg@sdg.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 20 Oct 2003 13:45:58 +0200
From: "Peter Pippinger" <primergy@t-online.de>
Subject: Displaying variables-list
Message-Id: <bn0hp4$296$00$1@news.t-online.com>
Hello NG,
I´m very new to perl. I have a list in %info. It has allways two parts: NAME and
VALUE.
For example:
name1,value1,name2,value2,name3,value3... and so on.
If i do the following...
**
foreach $test (%info){
print "$test \n";
}
**
...all the content of %info will be shown. But i need to have the content
devided into the two variables. So that i can do something like that:
LOOPBEGINNING
print "$name $value";
LOOPEND
How can i do that?
Thanks for any hints!
Peter
------------------------------
Date: Mon, 20 Oct 2003 15:57:39 +0400
From: Andrew Shitov <andy@shitov.ru>
Subject: Re: Displaying variables-list
Message-Id: <bn0ijj$ljp$1@gavrilo.mtu.ru>
> foreach $test (%info){
> print "$test \n";
> }
Threre are two keywords in perl: keys and values. In the code abouve you
try to use a hash in array context. Not good idea ;-) 'Foreach' requires
array, so give it to it.
keys %info returns an array of all the keys of %hash. Likewise values
%hash produses a list of all of its values.
So, you should run something like this:
foreach my $key (keys %info){
print "$key=$info{$key}\n";
}
------------------------------
Date: Mon, 20 Oct 2003 13:58:58 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Displaying variables-list
Message-Id: <bn0iqf$rjck5$1@ID-184292.news.uni-berlin.de>
Peter Pippinger wrote:
> I have a list in %info. It has allways two parts: NAME and VALUE.
> For example:
> name1,value1,name2,value2,name3,value3... and so on.
>
> If i do the following...
> **
> foreach $test (%info){
> print "$test \n";
> }
> **
> ...all the content of %info will be shown. But i need to have the
> content devided into the two variables. So that i can do something
> like that:
>
> LOOPBEGINNING
> print "$name $value";
> LOOPEND
>
> How can i do that?
You are asking a frequently asked question. You should check out the
Perl FAQ before posting here.
The answer to your question can be found at:
http://www.perldoc.com/perl5.8.0/pod/perlfaq4.html#Data--Hashes-(Associative-Arrays)
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Mon, 20 Oct 2003 12:42:31 GMT
From: "David Oswald" <djo@pacifier.com>
Subject: Re: Displaying variables-list
Message-Id: <XKQkb.14701$YO5.7019244@news3.news.adelphia.net>
"Peter Pippinger" <primergy@t-online.de> wrote in message
news:bn0hp4$296$00$1@news.t-online.com...
> Hello NG,
>
> I´m very new to perl. I have a list in %info. It has allways two parts:
NAME and
> VALUE.
> For example:
> name1,value1,name2,value2,name3,value3... and so on.
>
>
> If i do the following...
> **
> foreach $test (%info){
> print "$test \n";
> }
> **
> ...all the content of %info will be shown. But i need to have the content
> devided into the two variables. So that i can do something like that:
>
Hmm, I could expand on your code snippet as follows:
my $bool;
foreach $test ( %info ) {
next if ++$bool % 2;
print $test, "\n";
}
But instead of kludging your way through it, I recommend RTFM; particularly
the part about perldoc -f keys and perldoc -f values.
------------------------------
Date: Mon, 20 Oct 2003 07:40:15 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Displaying variables-list
Message-Id: <slrnbp7ltf.inv.tadmc@magna.augustmail.com>
Peter Pippinger <primergy@t-online.de> wrote:
> If i do the following...
> **
> foreach $test (%info){
> print "$test \n";
> }
> **
> ...all the content of %info will be shown. But i need to have the content
> devided into the two variables. So that i can do something like that:
>
> LOOPBEGINNING
> print "$name $value";
> LOOPEND
>
> How can i do that?
perldoc -f each
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 20 Oct 2003 14:14:19 +0200
From: Kåre Olai Lindbach <barbr-en@online.no>
Subject: Re: How do I make a standalone WIN32 executable from Perl?
Message-Id: <n2k7pvsn6ffmo4jqdoa8vqqfcajam6r21e@4ax.com>
On Sun, 19 Oct 2003 19:41:55 -0400, Jeff W <perlnews@kwcpa.com> wrote:
>James Willmore wrote:
>
>>On Sun, 19 Oct 2003 15:14:22 -0400
>>Jeff W <perlnews@kwcpa.com> wrote:
>>
>>> Hi - Since I'm not a programmer, and OOP C++ is a bit beyond me, but
>>> i AM a UNIX perl hacker, I was thinking of learning Perl/TK on WIN32
>>> so I could write PC scripts and utilities. I downloaded ActivePerl
>>> and looked at it. However, it appears that I would need a perl
>>> installation on every target machine. Is there any easy, (and low
>>> or zero cost) way to generate standalone Perl/Tk executables?
>>
>>In the land of *NIX, you could use perlcc to compile an application.
>>In Windows land, you _may_ have to get a comercial application -or-
>>use Cygwin, compile Perl, and then you _should_ have perlcc available
>>to you.
>>
>>I can't speak from experience, but that's my understanding.
>thanks James - I think you are saying I should run unix perl under
>cygwin and use the perlcc provided with that perl. Will that really
>give me a WIN executable?
I will, but you need to include the cygwin1.dll, and maybe other
dll-s, depending on how advanced your perlskript is, if you want to
run it in another MSwin-environment without Cygwin installed.
--
mvh/Regards
Kåre Olai Lindbach
------------------------------
Date: Mon, 20 Oct 2003 07:37:46 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: HTML whitespace/commnets cruncher
Message-Id: <slrnbp7loq.inv.tadmc@magna.augustmail.com>
Andrew Shitov <andy@shitov.ru> wrote:
> Look at the code on this page: http://webcode.ru/cgi/despace1/
It has several bugs in it.
It open()s FILE, but never reads from it.
It uses ampersand on function calls when it does not want the
semantics the go with using ampersand on function calls.
It will mangle spaces in <pre> sections.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 20 Oct 2003 10:19:46 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de>
Subject: Re: my first perl script!
Message-Id: <bn0cs2$l3a$1@nets3.rz.RWTH-Aachen.DE>
Also sprach Matthias Wille:
> I just started to learn perl and wrote my first program today (a big
> step for me, a small step for mankind...). Actually it does what it is
> supposed to do except for the part which is supposed to match a
> certain string. I would appreciate if some perl cracks in this group
> could take a short look at my script an tell me if it is good perl
> style and tell me some improvements and shortcuts I can make. After
> all I like to be a good perl programmer in the end... :-)
That's the spirit. :-)
> I'm wondering if there is a simpler way for replacing strings in a
> file without creating temp files.
Yes, there is, see later.
> Oh yes, the code should be as portable as possible, as it should run
> also on windows...
Oh, that could have some bearing on the in-place editing of a file. See
later as well.
> #!/usr/bin/perl
>
> use Cwd;
> use File::Copy;
> use File::Basename;
> use File::Path;
> #use strict;
> #use warnings;
These comments are unfortunate. Leave those two lines in:
use strict;
use warnings;
Strictures will require some changes to your script. I'll come to that.
> sub printUsage();
>
> # find out current working directory
> $cwd = Cwd::cwd();
$cwd is now a global variable. This has some other implications as well,
but for now make the variable a lexical one:
my $cwd = cwd();
This is a requirement of strict. It demands that you declare any
variable you are going to use. Thus it catches a lot of typoes.
> # check that we are in the right directory
> unless (basename(dirname($cwd)) eq "control") {
> die "please run this skript from inside a test family folder, i.e.
> 'thread'";
> }
>
> # get command line arguments
> ($oldcase, $newcase) = @ARGV;
Those are globals again. Once more, use my():
my ($oldcase, $newcase) = @ARGV;
You must not use my() on @ARGV since it's a special variable provided by
Perl. You find those special variables in perlvar.pod.
> # require at least one argument
> unless (defined $oldcase) {
> printUsage();
> exit 1;
> }
>
> $newcase = "$oldcase_COPY" unless defined $newcase;
> $family = basename($cwd);
$family is a newly introduced variable, therefore:
my $family = basename($cwd);
> # check if .pm file of oldcase exists
> die "Testcase $oldcase does not exist in this folder" unless (-e
> "$oldcase.pm");
>
> # try to open .pm files
> open(OLD, "<$oldcase.pm") or die "could not open file $oldcase.pm for
> reading: $!";
> open(NEW, ">$newcase.pm") or die "could not open file $newcase.pm for
> writing: $!";
>
> # read in old file and change all occurances of $oldcase to $newcase
> while($line = <OLD>) {
> $line =~ s/$oldcase/$newcase/g;
> print NEW $line;
> }
$line is a variable that you only use within the while-block. That means
that you really should make it valid only in this block. Again, use my()
for that:
while (my $line = <OLD>) {
>
> # now the same again with the html file, if any present
> if (-e "$oldcase.html") {
> open(OLD, "<$oldcase.html") or die "could not open file $oldcase.html
> for reading: $!";
> open(NEW, ">$newcase.html") or die "could not open file $newcase.html
> for writing: $!";
> while($line = <OLD>) {
> $line =~ s/$oldcase/$newcase/g;
> print NEW $line;
> }
Same here:
while (my $line = <OLD>) {
Note that the above $line is different from this one. They just appear
to have the same name, but they are two totally unrelated variables,
valid in two different blocks (=scopes).
> }
> else {
> print STDOUT "html file for testcase $oldcase is missing. you shoul
> add one...";
> }
>
> # add a new Case section for the new test in the isildap.ini file
> open(OLD, "<isildap.ini") or die "could not open file isildap.ini for
> reading: $!";
> open(NEW, ">isildap.ini.new") or die "could not open file isildap.ini
> for writing: $!";
>
> # read all lines of isildap.ini file
> $lines = join("", <OLD>);
my $lines = join "", <OLD>;
However, there's a better way to slurp in a whole file:
open OLD, ...;
my $lines = do {
local $/; # enable "slurp" mode
<OLD>;
};
The do() block returns its last evaluated statement which is "<OLD>".
local() will give the variable $/ (it's a special variable and it's
global) temporarily a new value. This new value only exists within the
block. Upon leaving the block, it's previous value is restored. This
mechanism is called dynamic scoping...it does not work with variables
that had been declared with my() because those are lexicals. If you just
use a variable without declaring it, you automatically get such a global
and dynamically scoped variable. That's why you should use my(), unless
you really need a dynamic variable.
> # find matching 'Case = $oldcase { }' block and duplicate it
> print STDOUT "found match\n" if $lines =~
> m/Case.*=.*$oldcase.*\{(.*?)\}/s;
You can just say
print "found match\n" ...
Perl is not C.
> print NEW $lines;
> print NEW "\n";
> $newpattern = $&;
> $newpattern =~ s/$oldcase/$newcase/g;
> print NEW $newpattern;
Here are two problems: you should not use the variable $& (same for $'
and $`) unless you really need them. They will slow down every
pattern-match in your script since now each pattern has to be made
capturing. But you can avoid this global slowdown by making only
selected patterns capturing:
if ($lines =~ /(Case.*=.*$oldcase.*\{(.*?)\})/s) {
print "found match\n";
my $newpattern = $1;
$newpattern =~ s/$oldcase/$newcase/g;
print NEW $newpattern;
}
Another problem is even more serious: you assume that the pattern match
succeeded, but you shouldn't. Whenever you use variables such as $&, $',
$`, $1, $2, ..., make sure that the previous match did in fact succeed.
Otherwise you end up having garbage in this variables. Perl does not
reset them for each pattern match, that's why you have to wrap their
usage as shown above.
> # delete old isildap.ini file and rename new one
> #unlink("isildap.ini") or die "could not delete old isildap.ini file";
> #File::Copy::move("isildap.ini.new", "isildap.ini") or die "could not
> rename file";
>
> # add a new addVariants entry for the new test in the <family>.pm file
> open(OLD, "<$family.pm") or die "could not open file $family.pm for
> reading: $!";
> open(NEW, ">$family.pm.new") or die "could not open file $family.pm
> for writing: $!";
>
> while($line = <OLD>) {
while (my $line = <OLD>) {
> print NEW $line;
> if($line =~ s/'$oldcase'/'$newcase'/g) {
> print NEW $line;
> }
> }
>
> # delete old $family.pm file and rename new one
> # unlink("$family.pm") or die "could not delete old $family.pm file";
> # File::Copy::move("$family.pm.new", "$family.pm") or die "could not
> rename file";
>
> exit 0;
Not really needed, but wont hurt either.
> # print some help on usage of this skript
> sub printUsage() {
> select STDOUT;
That's a little odd. STDOUT is select()ed by default. Unless you haven't
selected a different filehandle, this line is not needed.
> print "SYNOPSIS:\n";
> print "\ttbcopytest testcasename [ newname ]\n";
> }
As for in-place editing of files, there's a useful idiom that is derived
from a typical one-liner technique:
# put all the files you want to edit
# into @ARGV
local @ARGV = qw( file1 file2 file3 );
local $^I = ''; # it it is defined, in-place edit is done
while ($_ = <>) {
$_ =~ s/old/new/g;
print $_;
}
$^I is the value of the -i switch (see 'perldoc perlrun'). <> reads one
after the other each file in @ARGV. The current record (=line in this
case) in the file is replaced with what you print. Note that you can do
away with the $_ altogether:
while (<>) {
s/old/new/g;
print;
}
The limitation is that this is not going to work under Windows. I am not
sure, but you can set $^I to a true value ('.bak') for instance. In this
case, a backup of the original files is created with the suffix .bak.
This might even work on Windows.
Tassilo
--
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval
------------------------------
Date: Mon, 20 Oct 2003 10:30:32 +0200
From: Desmond Coughlan <pasdespam_desmond@zeouane.org>
Subject: Re: my first perl script!
Message-Id: <82jc61-ui6.ln1@zeouane.org>
le 20 Oct 2003 00:34:47 -0700, dans l'article <3395b56f.0310192334.a66a044@posting.google.com>, Matthias Wille <m.wille@gmx.ch> a dit ...
> I just started to learn perl and wrote my first program today
Just as a matter of interest..how long have you been doing Perl ? I ask
because I've been working with some Perl books and online tutorials for
about three months, now (on and off, admittedly, as I have other
priorities), and I can _just about_ understand 'hello world!'
So if you tell me you started last week, I'm going to be _very_ depressed.
--
Desmond Coughlan |desmond [at] zeouane [dot] org
http://www.zeouane.org/
------------------------------
Date: 20 Oct 2003 10:54:00 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de>
Subject: Re: my first perl script!
Message-Id: <bn0es8$n7i$1@nets3.rz.RWTH-Aachen.DE>
Also sprach Desmond Coughlan:
> le 20 Oct 2003 00:34:47 -0700, dans l'article <3395b56f.0310192334.a66a044@posting.google.com>, Matthias Wille <m.wille@gmx.ch> a dit ...
>
>> I just started to learn perl and wrote my first program today
>
> Just as a matter of interest..how long have you been doing Perl ? I ask
> because I've been working with some Perl books and online tutorials for
> about three months, now (on and off, admittedly, as I have other
> priorities), and I can _just about_ understand 'hello world!'
>
> So if you tell me you started last week, I'm going to be _very_ depressed.
Maybe he just started this morning. ;-)
Anyway, those figures can't be sensibly compared. It depends on one's
background for instance. Someone being familiar with programming, is
likely to pick up Perl more quickly than someone who's not. On the other
hand, sometimes prior knowledge can be in the way. A Java programmer
might though understand the concepts but could have an inner reluctancy
to accept them which could slow down his learning process.
Anyway, keep reading this group...you'll learn by osmosis (things
sneaking secretely into your mind). If not already done, you could also
subscribe to the beginners@perl.org mailing-list which usually have
discussions on a gentler level.
Tassilo
--
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval
------------------------------
Date: Mon, 20 Oct 2003 12:29:02 GMT
From: "sdfgsd" <sdfg@sdg.com>
Subject: Re: my first perl script!
Message-Id: <iyQkb.142521$eS5.134351@twister.tampabay.rr.com>
> Just as a matter of interest..how long have you been doing Perl ? I ask
> because I've been working with some Perl books and online tutorials for
> about three months, now (on and off, admittedly, as I have other
> priorities), and I can _just about_ understand 'hello world!'
If it's any consolation, I've been developing software for almost 17 years
and somehow have never had to touch perl. Well that ended three weeks ago.
It's a tough language at first because there is so much functionality to be
had in so few lines of code that you really have to know ALL the basics
before developing any non-trivial programs. Best approach (IMHO), learn the
basics and study OPC (other peoples code) and have a specific need to learn
it.
------------------------------
Date: Mon, 20 Oct 2003 07:29:53 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: my first perl script!
Message-Id: <slrnbp7la1.inv.tadmc@magna.augustmail.com>
Matthias Wille <m.wille@gmx.ch> wrote:
> I would appreciate if some perl cracks in this group
> could take a short look at my script an tell me if it is good perl
> style and tell me some improvements and shortcuts I can make.
> I'm wondering if there is a simpler way for replacing strings in a
> file without creating temp files.
How do I change one line in a file/
delete a line in a file/
insert a line in the middle of a file/
append to the beginning of a file?
> #use strict;
> #use warnings;
You lose the benefit of those statments when you comment them out,
so don't do that. :-)
> unless (basename(dirname($cwd)) eq "control") {
> die "please run this skript from inside a test family folder, i.e.
> 'thread'";
> }
That should be either:
e.g. 'thread' ("for example")
or
i.e. 'control' ("that is")
> $newcase = "$oldcase_COPY" unless defined $newcase;
Do you really want $newcase to get the empty string here?
If not, then either warnings or strictures would have found this bug.
Perhaps you meant:
$newcase = "${oldcase}_COPY" unless defined $newcase;
or
$newcase = $oldcase . "_COPY" unless defined $newcase;
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 20 Oct 2003 10:11:15 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: Newbie dumb but quick question
Message-Id: <s1d7pvo66ll25t6huovbo3iqafanqdrjn1@4ax.com>
Jeff W wrote:
>Question: Is it possible to create WIN32 Perl scripts and
>"compile" them so that they will run places where Perl is
>not installed?
Yes. There's PerlApp and perl2exe, both not free (though not too
expensive if this is for professional use), and there is PAR. For the
latter, see CPAN.
<http://search.cpan.org/~autrijus/PAR-0.75/>
--
Bart.
------------------------------
Date: Mon, 20 Oct 2003 10:12:46 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: Newbie dumb but quick question
Message-Id: <g8d7pvsg2bug168d0ivlbaqfgemftt7oqq@4ax.com>
Jeff W wrote:
>i hate scrolling to
>the bottom so I assume others do too.
I hate puzzling the dialog back together.
--
Bart.
------------------------------
Date: Mon, 20 Oct 2003 07:06:27 -0400
From: Chris Mattern <syscjm@gwu.edu>
Subject: Re: Newbie dumb but quick question
Message-Id: <3F93C1B3.8030009@gwu.edu>
Jeff W wrote:
>
> Sam Holden wrote:
>
>
>>Though it isn't labelled "top posting", see the section headed
>>"Use an effective followup style" in the guidelines at the URL you
>>were pointed in the previous message (which I've left below).
>>
>
> ok - got it - guess it's a personal style thing - i hate scrolling to
> the bottom so I assume others do too.
> Point noted.
You can satisfy both needs (and should, in fact). Bottom post so
people can follow the conversation. Prune the quoted section of
whatever is not directly related to your reply (but leave enough
to provide context) so people don't have to scroll down to see
your reply.
Chris Mattern
------------------------------
Date: Mon, 20 Oct 2003 07:42:24 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Perl security guru needed for a quick, 2 hr, job.
Message-Id: <slrnbp7m1g.inv.tadmc@magna.augustmail.com>
Public Interest <no@no.no> wrote:
> Javascript only works in IE
No it doesn't.
It works in many browsers.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 20 Oct 2003 05:17:26 -0700
From: sctommi@gmx.net (Thomas)
Subject: Re: really hard regex ;(
Message-Id: <5a1109df.0310200417.7b60f570@posting.google.com>
"Bill Segraves" <segraves_f13@mindspring.com> wrote in message news:<2u%jb.1484$W16.318@newsread2.news.atl.earthlink.net>...
> If you mean to replace instances of
> /V (old_value)
> with
> /V (new_value)
>
> in a PDF file, your efforts are likely misguided, as a PDF file is not
> intended to be edited in this fashion. While you may be able to make the
> substitutions you desire in some cases, your efforts will often be
> frustrated by the generation of invalid PDF files.
u are right ;) i can tell u so many lessons about frustation by
generation of PDF
> You'll enjoy greater success if you use the import/export (FDF, XFDF), and
> submit methods that are officially supported for PDFs.
for sure, this is one possible solution...but not without some
problems to me...
1) import/export only working with adobe writer or equal (or do i
missed something)...
2) the forms i like to publish should be encoded so nobody can change
any content he shouldnt change
=> the finishing result of all work (my & the world) should be a PDF
which is totally read only - so any other people can read the document
but nobody can change it...
3) export of formdata is not the method i like to support my
people...they should be able to get a filled form and send it to my
script without any other tools...
> IMO, your objective is more appropriate for newsgroup comp.text.pdf, where
> you'll find a number of experts willing to guide you on legitimate issues
> with the use of PDF files.
maybe - but i think my problem is much nearer to perl regex than a
special of pdf...thatswhy i posted it here...
> Good luck.
> Bill Segraves
thanks ;)
Thomas
------------------------------
Date: Mon, 20 Oct 2003 07:01:49 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: retrieving info from file
Message-Id: <slrnbp7jld.inv.tadmc@magna.augustmail.com>
Peter <feurry@hotmail.com> wrote:
> Tad McClellan wrote:
>> Peter <feurry@hotmail.com> wrote:
>>>($probe) =~ m/\(-vop crop\=(\d+)\:(\d+):(\d+):(\d+)/;
>> ^ ^
>> Why do you have those parenthesis there?
>
> My mistake...i didn't use them..sorry for the confusion!
Do not re-type Perl code
Use copy/paste or your editor's "import" function rather than
attempting to type in your code. If you make a typo you will get
followups about your typos instead of about the question you are
trying to get answered.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 20 Oct 2003 12:23:37 GMT
From: "sdfgsd" <sdfg@sdg.com>
Subject: Re: Rookie: Constructing a large SQL INSERT statement
Message-Id: <dtQkb.142480$eS5.39070@twister.tampabay.rr.com>
"sdfgsd" <sdfg@sdg.com> wrote in message
news:kbHkb.185242$Of2.4682150@twister.tampabay.rr.com...
> Disclaimer: I've googled and searched Perldoc/CPAN.
>
> The format of the INSERT statement is:
>
> INSERT INTO mytable (field_1, field_2, field_3)
> VALUES (value_1, value_2, value_3),
> (value_1, value_2, value_3),
> (value_1, value_2, value_3),
> (value_1, value_2, value_3),
> etc. ;
Thanks for the responses.
The above insert statement is used for large, single inserts into a MySQL
table. Instead of looping over an INSERT statement a few thousand times, it
is easier to construct the statement as the data is being generated, THEN
deliver it to the database.
In Delphi I just built one big string and sent it to the db. Being new to
perl, I'm just not sure what the best is to deliver this statement.
Thanks again for any additional thoughts.
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.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.
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 V10 Issue 5684
***************************************