[18921] in Perl-Users-Digest
Perl-Users Digest, Issue: 1116 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jun 12 06:05:33 2001
Date: Tue, 12 Jun 2001 03:05:10 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <992340309-v10-i1116@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 12 Jun 2001 Volume: 10 Number: 1116
Today's topics:
Accessing Parallel Port Data <spp@monaco377.com>
Excel and Perl <David.Hiskiyahu@alcatel.be>
Re: Excel and Perl <pne-news-20010612@newton.digitalspace.net>
Function error <jddp@tid.es>
Re: Grouping and sorting <gnarinn@hotmail.com>
Mysql connect specifying port antikythera_bloodbath@hotmail.com
Re: Mysql connect specifying port <pne-news-20010612@newton.digitalspace.net>
Re: newbie question (Anno Siegel)
Re: newbie question <jddp@tid.es>
open two files for line processing concurrently??? <cygnus@sinamail.com>
Re: open two files for line processing concurrently??? (Anno Siegel)
Re: open two files for line processing concurrently??? <buggs-clpm@splashground.de>
Re: open two files for line processing concurrently??? (Bernard El-Hagin)
Re: Parsing from HTTP. (Jon Tite)
Perl "html Tables" <martin.cassidy@uk.sun.com>
Re: Perl "html Tables" <mk@ticklets.com>
perl -s : How to know the original command line? <johnlin@chttl.com.tw>
Re: perl -s : How to know the original command line? (Anno Siegel)
Re: perl -s : How to know the original command line? (Rafael Garcia-Suarez)
PERL and Shareware (SANFACE Software)
Q: How to make a Perlscript Shareware? <admin@the-piper.net>
Script (out)@ono.com (Juanjo)
Re: system() and exec() don't execute but don't die eit (Villy Kruse)
Re: Urgent : control code sequences?!?! nobull@mail.com
Re: Vars, vars, vars... <horst.fickenscher@sealsystems.de>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 12 Jun 2001 07:33:05 GMT
From: Parkings Publics de Monaco <spp@monaco377.com>
Subject: Accessing Parallel Port Data
Message-Id: <3B25C641.2C162D10@monaco377.com>
Hi all,
I just bought an electronic device that allow me, throught the parallel
port, to get the atomic time (DCF module).
It transmits "0" and "1" using the 15th pin of the parallel port (paper
error).
On the net, there are only C drivers.
I didn't understand anything for 2 reasons:
- There are all in C langage (I'm not familiar).
- All comments are in German (I don't speak German).
I just understand that the way used to access the parallel port is using
parport primitives (the linux parallel port generic driver).
Can anybody explain me how to do that in Perl ?
If the method is using ioctl library, please explain me the way to
manage to get the pin 15 informations.
Thanks in advance.
Sebastien
------------------------------
Date: Tue, 12 Jun 2001 10:39:40 +0200
From: David Hiskiyahu <David.Hiskiyahu@alcatel.be>
Subject: Excel and Perl
Message-Id: <3B25D54B.B8E52C84@alcatel.be>
Can anyone recommend a module that could help
manipulate Excel files from a Perl program?
------------------------------
Date: Tue, 12 Jun 2001 10:42:47 +0200
From: Philip Newton <pne-news-20010612@newton.digitalspace.net>
Subject: Re: Excel and Perl
Message-Id: <qflbit0r5n7vmc0fmi7lqj8iqlvnhtl0vo@4ax.com>
On Tue, 12 Jun 2001 10:39:40 +0200, David Hiskiyahu
<David.Hiskiyahu@alcatel.be> wrote:
> Can anyone recommend a module that could help
> manipulate Excel files from a Perl program?
Win32::OLE
Cheers,
Philip
--
Philip Newton <nospam.newton@gmx.li>
Yes, that really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.
------------------------------
Date: Tue, 12 Jun 2001 08:59:29 +0200
From: Juan Delgado =?iso-8859-1?Q?D=EDaz=2DPache?= <jddp@tid.es>
Subject: Function error
Message-Id: <3B25BDD0.220F08FA@tid.es>
Hi,
Can anyone tell me if this function is correct?
sub import {
shift;
my $mask = ${^WARNING_BITS} ;
if (vec($mask, $Offsets{'all'}, 1)) {
$mask |= $Bits{'all'} ;
$mask |= $DeadBits{'all'} if vec($mask, $Offsets{'all'}+1, 1);
}
${^WARNING_BITS} = $mask | bits(@_ ? @_ : 'all') ;
}
Does {^ this make sense?, or could it be a transference problem. I don't
think it to be either but i'm quite lost in this perl world.
Thanks
Juan
------------------------------
Date: Tue, 12 Jun 2001 09:27:32 +0000
From: gnari <gnarinn@hotmail.com>
Subject: Re: Grouping and sorting
Message-Id: <992338052.115524596069008.gnarinn@hotmail.com>
In article <9g2q7v$j4r$1@news.netmar.com>, <twolfmaier@acm.org> wrote:
>
>I have a problem I don't seem to be able to wrap my mind around. I need to
>group hashes based on the starting character of a key value and then sort
>them.
>
>Let me illustrate this on a example. I need to create a glossary. I have an
>array of hashes containing the terms and descriptions:
>
>
>my @glossary = (
> { 'term' => 'ccc', 'description' => 'ccc description' },
> { 'term' => 'aaa', 'description' => 'aaa description' },
> { 'term' => 'bbb', 'description' => 'bbb description' },
> { 'term' => 'aba', 'description' => 'aba description' }
> # many more
>);
>
(snipped more details)
I am assuming the hashes have been simplified, else a differend data
structure might be more appropriate.
what is exactly your problem?
sorting array in general, see perldoc -q sort an array
take a look at the Schwartzian Transform
to deal wish special sort sequences you might use locale if
that is appropriate, or need to precalculate keys in the
second map of the Schwartzian Transform.
then we get something like:
@sorted= map {$_->[0] }
sort { $a->[1] cmp $b->[1] }
map { [ $_,
# precalculation here. $_ is hashref
# we something that returns a transformation of the
# key(s) that can be sorted alphabetically
precalc($_->{term})
] } @glossary;
# simplified example assuming keys contain only characters a,b,c and á
# and digits. lets say digits should sort last
sub precalc {
my ($key)=@_;
$key=~tr/aábc0123456789/0123456789abcd/;
$key;
}
displaying the list should now not be a problem, applying any grouping
you want
of course, there are many ways to do it.
hope this helps
gnari
------------------------------
Date: 12 Jun 2001 08:15:17 GMT
From: antikythera_bloodbath@hotmail.com
Subject: Mysql connect specifying port
Message-Id: <9g4j2l$nrf$1@news.netmar.com>
As this has to do with the Perl DBI, and I couldn't find a mysql specific
newsgroup I posted it here.
I need to specify the port which is used to connect to the host. Up till now I
have been running the script on a localhost and did not need to specify the
port. Below is the code fragment with the connect command.
my ($dsn) = "DBI:mysql:database:hostname.host.com";
my ($database_user_name) = "username";
my ($database_password) = "password";
$dbh = DBI->connect ($dsn, $database_user_name, $database_password);
I am able to run mysql with the -P <port> option from the command line. My
question is how would I go about specifying the port in the call to connect.
my ($dsn) = "DBI:mysql:database:hostname.host.com";
my ($database_user_name) = "username";
my ($database_password) = "password";
my ($database_port) = "11111";
$dbh = DBI->connect( ?????? );
Thanks in advance.
Anti
----- Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web -----
http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
NewsOne.Net prohibits users from posting spam. If this or other posts
made through NewsOne.Net violate posting guidelines, email abuse@newsone.net
------------------------------
Date: Tue, 12 Jun 2001 10:42:14 +0200
From: Philip Newton <pne-news-20010612@newton.digitalspace.net>
Subject: Re: Mysql connect specifying port
Message-Id: <01lbitsj4jjh3dis4auk51aj6nedqv8ms4@4ax.com>
On 12 Jun 2001 08:15:17 GMT, antikythera_bloodbath@hotmail.com wrote:
> My question is how would I go about specifying the port in the call to
> connect.
RTFM. From `perldoc DBD::mysql`:
: connect
: use DBI;
:
: $driver = "mSQL"; # or "mSQL1"
: $dsn = "DBI:$driver:$database";
: $dsn = "DBI:$driver:database=$database;host=$hostname";
:
: $dbh = DBI->connect($dsn, undef, undef);
:
: or
:
: $dsn = "DBI:mysql:$database";
: $dsn = "DBI:mysql:database=$database;host=$hostname";
: $dsn = "DBI:mysql:database=$database;host=$hostname;port=$port";
:
: $dbh = DBI->connect($dsn, $user, $password);
:
: A `database' must always be specified.
:
: host
: port The hostname, if not specified or specified as '', will
: default to an mysql or mSQL daemon running on the local
: machine on the default port for the UNIX socket.
:
: Should the mysql or mSQL daemon be running on a non-standard
: port number, you may explicitly state the port number to
: connect to in the `hostname' argument, by concatenating the
: *hostname* and *port number* together separated by a colon (
: `:' ) character or by using the `port' argument. This
: doesn't work for mSQL 2: You have to create an alternative
: config file and load it using the msql_configfile attribute,
: see below.
So you could try changing
> my ($dsn) = "DBI:mysql:database:hostname.host.com";
> my ($database_port) = "11111";
to either of
> my ($dsn) = "DBI:mysql:database:hostname.host.com:11111";
(not sure about this syntax since while 'database:hostname' appears to
work, it's not one of the example syntaxes in the DBD::mysql docs)
or
> my ($dsn) = "DBI:mysql:database=database;host=hostname.host.com;port=11111";
.
Cheers,
Philip
--
Philip Newton <nospam.newton@gmx.li>
Yes, that really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.
------------------------------
Date: 12 Jun 2001 08:26:23 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: newbie question
Message-Id: <9g4jnf$1kr$1@mamenchi.zrz.TU-Berlin.DE>
According to Juan Delgado <jddp@tid.es>:
[please place your reply below the suitably trimmed quoted text]
> But i have just installed 5.6.1 version and the warnings.pm file is in the
> /usr/local/lib/perl5/5.6.1
> directory. It doesn't seem to be mixed.
When Perl complains about "${^WARNING_BITS}" it isn't 5.6.1. I suppose
the "commercial product" you mention in your original post (now gone)
runs a different version of Perl.
> Is it correct to have a function like
> this in that file:
>
> sub import {
> shift;
> my $mask = ${^WARNING_BITS} ;
> if (vec($mask, $Offsets{'all'}, 1)) {
> $mask |= $Bits{'all'} ;
> $mask |= $DeadBits{'all'} if vec($mask, $Offsets{'all'}+1, 1);
> }
> ${^WARNING_BITS} = $mask | bits(@_ ? @_ : 'all') ;
> }
>
> Does {^ this make sense?, or could it be a transference problem. I don't
> think it to be either but i'm quite lost in this perl world.
Yes, it is supposed to be there. I looked it up on my system and
told you so in my reply. Why do you ask again?
Also in my first reply I suggested renaming warnings.pl to something
else and running the program again. Have you done that? What happened?
Have you read my reply at all?
Anno
------------------------------
Date: Tue, 12 Jun 2001 11:30:02 +0200
From: Juan Delgado =?iso-8859-1?Q?D=EDaz=2DPache?= <jddp@tid.es>
Subject: Re: newbie question
Message-Id: <3B25E11A.E0235E6C@tid.es>
Here you have your error:
$ perl NewSegmentAnalysis.pl
The following values are being used by NewSegmentAnalysis.pl.
$DBNAME = RMS2
$DBTYPE = oracle
$REPO = netCustomer
$HOST = mustang
$USER = vgnrms
$PASSWORD = ********
$ESC = \
$SERVER_PLATFORM = UNIX
Executing the Collector...
The following values are being used by ExecuteCollector.pl.
$DBNAME = RMS2
$DBTYPE = oracle
$REPO = netCustomer
$HOST = mustang
$USER = vgnrms
$PASSWORD = ********
$ESC = \
Collecting New Data...
ERROR: Tue Jun 12 11:39:37 101: Process CreateSourceTablesRequest-1: DMMPerlEngi
ne.EvalString[PerlFeature, 8]:
perl_eval_pv FAILED: Can't locate warnings.pm in @INC (@INC contains: /usr/l
ocal/lib/perl5/5.6.1/sun4-solaris /usr/local/lib/perl5/5.6.1 /home2/trapnell/per
l5/lib/5.00503/sun4-solaris /home2/trapnell/perl5/lib/5.00503 /home2/trapnell/pe
rl5/lib/site_perl/5.005/sun4-solaris /home2/trapnell/perl5/lib/site_perl/5.005 .
Perl /usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris /usr/local/lib/perl5/sit
e_perl/5.6.1 /usr/local/lib/perl5/site_perl) at /usr/local/lib/perl5/5.6.1/warni
ngs/register.pm line 11.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/5.6.1/vars.pm line 12.
BEGIN failed--compilation aborted at Perl/DmmPerl.pm line 7.
Anno Siegel wrote:
> According to Juan Delgado <jddp@tid.es>:
>
> [please place your reply below the suitably trimmed quoted text]
>
> > But i have just installed 5.6.1 version and the warnings.pm file is in the
> > /usr/local/lib/perl5/5.6.1
> > directory. It doesn't seem to be mixed.
>
> When Perl complains about "${^WARNING_BITS}" it isn't 5.6.1. I suppose
> the "commercial product" you mention in your original post (now gone)
> runs a different version of Perl.
>
> > Is it correct to have a function like
> > this in that file:
> >
> > sub import {
> > shift;
> > my $mask = ${^WARNING_BITS} ;
> > if (vec($mask, $Offsets{'all'}, 1)) {
> > $mask |= $Bits{'all'} ;
> > $mask |= $DeadBits{'all'} if vec($mask, $Offsets{'all'}+1, 1);
> > }
> > ${^WARNING_BITS} = $mask | bits(@_ ? @_ : 'all') ;
> > }
> >
> > Does {^ this make sense?, or could it be a transference problem. I don't
> > think it to be either but i'm quite lost in this perl world.
>
> Yes, it is supposed to be there. I looked it up on my system and
> told you so in my reply. Why do you ask again?
>
> Also in my first reply I suggested renaming warnings.pl to something
> else and running the program again. Have you done that? What happened?
> Have you read my reply at all?
>
> Anno
------------------------------
Date: Tue, 12 Jun 2001 16:46:21 +0800
From: "news.giga.net.tw" <cygnus@sinamail.com>
Subject: open two files for line processing concurrently???
Message-Id: <9g4n4d$2mvi$1@news1.giga.net.tw>
Dear all,
as title, if we just open one file for line processing, just need to use
$_, but if I need to open two files for processing, for example, if line N
in file 1 not equal to line 1 in file 2, then compare with line 2 in file2,
....
thanks for your answer.
Ken.
------------------------------
Date: 12 Jun 2001 09:03:51 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: open two files for line processing concurrently???
Message-Id: <9g4ltn$1kr$3@mamenchi.zrz.TU-Berlin.DE>
According to news.giga.net.tw <cygnus@sinamail.com>:
> Dear all,
> as title, if we just open one file for line processing, just need to use
> $_, but if I need to open two files for processing, for example, if line N
> in file 1 not equal to line 1 in file 2, then compare with line 2 in file2,
> ....
The line input operator <> has no particular relationship with $_.
Only in the special case "while ( <$f> ) { ..." is the result
automatically assigned to $_, but you can change that:
"while ( $line = <$f> ) { ...". If you want to process two files
side by side, you can use a while loop like this:
while ( $line1 = <$f1> or $line2 = <$f2> ) { ...
Note that you will have to check both $line1 and $line2 for
defined-ness inside the loop if it matters.
Anno
------------------------------
Date: Tue, 12 Jun 2001 11:48:54 +0200
From: buggs <buggs-clpm@splashground.de>
Subject: Re: open two files for line processing concurrently???
Message-Id: <9g4ol8$753$02$1@news.t-online.com>
Anno Siegel wrote:
> The line input operator <> has no particular relationship with $_.
> Only in the special case "while ( <$f> ) { ..." is the result
> automatically assigned to $_, but you can change that:
> "while ( $line = <$f> ) { ...". If you want to process two files
> side by side, you can use a while loop like this:
>
> while ( $line1 = <$f1> or $line2 = <$f2> ) { ...
That will process the second file after the first file.
Buggs
------------------------------
Date: Tue, 12 Jun 2001 09:57:38 +0000 (UTC)
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: open two files for line processing concurrently???
Message-Id: <slrn9ibp4v.k93.bernard.el-hagin@gdndev25.lido-tech>
On Tue, 12 Jun 2001 11:48:54 +0200, buggs <buggs-clpm@splashground.de> wrote:
>Anno Siegel wrote:
>
>
>> The line input operator <> has no particular relationship with $_.
>> Only in the special case "while ( <$f> ) { ..." is the result
>> automatically assigned to $_, but you can change that:
>> "while ( $line = <$f> ) { ...". If you want to process two files
>> side by side, you can use a while loop like this:
>>
>> while ( $line1 = <$f1> or $line2 = <$f2> ) { ...
>
>That will process the second file after the first file.
I think Anno meant:
while ( $line1 = <$f1> and $line2 = <$f2> )
Cheers,
Bernard
--
perl -l54e's yyw q q tvmrx "h\ywx ersxliv zivp legoiv"qiy;y #a-zA-Z#d-gu-z#
chefghijklmnopqrstuvwxyzcJab-def-uPwxyzc;s j j s u u s t t s r r s
ppevalpereeteueje'
------------------------------
Date: 12 Jun 2001 01:00:36 -0700
From: dapea@hotmail.com (Jon Tite)
Subject: Re: Parsing from HTTP.
Message-Id: <4a4254c6.0106120000.776cc99c@posting.google.com>
I'm sorry for the contradiction!
Guess I should revise the rules of asking a question here :)
Thanks for your help,
Jon.
------------------------------
Date: Tue, 12 Jun 2001 10:06:47 +0100
From: martin cassidy <martin.cassidy@uk.sun.com>
Subject: Perl "html Tables"
Message-Id: <3B25DBA7.57DEDB46@uk.sun.com>
Hi all,
I am trying to write a web page where i ping, arp and rup some machines
and return the data to a page in table format. My problem is when i run
the ping command i get the info ok in column 1 but i cannot get the arp
and rup data to display in the correct columns. Any Ideas ! My code is
below :-
PERL
-=-=-
#! /usr/bin/perl
require "parser.cgi";
&Parse_Form;
select(stdout); $| =1;
print "Content-type: text/html \n\n";
print "<HTML>\n";
print "<BODY>\n";
print "<H1><U>Ping Results</U></H1><P>";
print "<TABLE BORDER=3 WIDTH=60%>\n";
print "<TR><TH>Host<TH>Ping<TH>MAC Address<TH>Uptime\n";
foreach $key (keys %formdata) {
print "<TR><TR><TH>$key<TD>$formdata{key}\n\n";
system ("ping $key.uk")}
print "</TABLE>";
print "</BODY></HTML>";
HTML
-=-=
<head>
<title>Server Stat Tool</title>
</head>
<H1>Server Stat Tool</H1>
<BR>
<body align=center BGCOLOR="LIGHTBLUE"></body>
<FORM METHOD="POST" ACTION="http://myserver.com/cgi-bin/pinger.cgi">
<INPUT NAME="server1"><BR><BR>
<INPUT NAME="server2"><BR><BR>
<INPUT NAME="server3"<BR><BR>
<BR><BR><BR><BR><BR><BR>
<input type=submit value="Submit">
<input type=reset value="Reset">
</HTML>
I am not sure if the HTML is correct, infact is probably wrong for what
i want to do, all i want is the perl to read a list of machines and ping
arp and rup each of them.
any help is greatly appreciated
Martin
------------------------------
Date: Tue, 12 Jun 2001 11:47:19 +0200
From: "Paul Kersey" <mk@ticklets.com>
Subject: Re: Perl "html Tables"
Message-Id: <9g4oi1$1k2$1@news1.xs4all.nl>
> I am not sure if the HTML is correct, infact is probably wrong for what
> i want to do, all i want is the perl to read a list of machines and ping
> arp and rup each of them.
It is wrong indeed. Here is a link where it is shown the right way. Good
luck.
http://developer.netscape.com/docs/manuals/htmlguid/index.htm
------------------------------
Date: Tue, 12 Jun 2001 15:43:51 +0800
From: "John Lin" <johnlin@chttl.com.tw>
Subject: perl -s : How to know the original command line?
Message-Id: <9g4h3i$l7p@netnews.hinet.net>
Dear all,
My program is like this:
#!/usr/bin/perl -s
print scalar localtime," - $0 @ARGV\n";
Hoping to record in the log file how program was envoked each time.
Tue Jun 12 15:24:02 2001 - runjob.pl job1 job2 job3
Tue Jun 12 15:24:12 2001 - runjob.pl -debug -verbose job1 job2 job3
Tue Jun 12 15:24:22 2001 - runjob.pl -operator=John job1 job2 job3
But those -s switches were removed from @ARGV even before BEGIN{}.
So I got:
Tue Jun 12 15:24:02 2001 - runjob.pl job1 job2 job3
Tue Jun 12 15:24:12 2001 - runjob.pl job1 job2 job3
Tue Jun 12 15:24:22 2001 - runjob.pl job1 job2 job3
What can I do to get the original command line when using -s?
Thank you.
John Lin
------------------------------
Date: 12 Jun 2001 08:49:22 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: perl -s : How to know the original command line?
Message-Id: <9g4l2i$1kr$2@mamenchi.zrz.TU-Berlin.DE>
According to John Lin <johnlin@chttl.com.tw>:
> Dear all,
>
> My program is like this:
>
> #!/usr/bin/perl -s
> print scalar localtime," - $0 @ARGV\n";
>
> Hoping to record in the log file how program was envoked each time.
>
> Tue Jun 12 15:24:02 2001 - runjob.pl job1 job2 job3
> Tue Jun 12 15:24:12 2001 - runjob.pl -debug -verbose job1 job2 job3
> Tue Jun 12 15:24:22 2001 - runjob.pl -operator=John job1 job2 job3
>
> But those -s switches were removed from @ARGV even before BEGIN{}.
> So I got:
>
> Tue Jun 12 15:24:02 2001 - runjob.pl job1 job2 job3
> Tue Jun 12 15:24:12 2001 - runjob.pl job1 job2 job3
> Tue Jun 12 15:24:22 2001 - runjob.pl job1 job2 job3
>
> What can I do to get the original command line when using -s?
I don't think you can, short of scanning %main:: for unexpected
variables and reporting these. When your program gains control,
the switches have already been processed and removed from @ARGV.
If you are only interested in a few possible switches your
program takes note of, you can check for those and (partially)
reconstruct the command line.
Otherwise, use one of the Getopt:: modules and save @ARGV before
you invoke option processing.
Anno
------------------------------
Date: 12 Jun 2001 08:41:53 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: perl -s : How to know the original command line?
Message-Id: <slrn9iblfp.pdn.rgarciasuarez@rafael.kazibao.net>
John Lin wrote in comp.lang.perl.misc:
}
} What can I do to get the original command line when using -s?
You can't -- you should use one of the Getopt::* modules instead.
--
Rafael Garcia-Suarez / http://rgarciasuarez.free.fr/
perl -sleprint -- -_='Just another Perl hacker,'
------------------------------
Date: 12 Jun 2001 02:06:57 -0700
From: sanface@sanface.com (SANFACE Software)
Subject: PERL and Shareware
Message-Id: <18712ccd.0106120106.eff41e3@posting.google.com>
Hello,
It's more than 3 year that we develop our shareware tools written with
perl.
We want to show our point of view about the argument "PERL and
shareware".
CPAN is close for perl shareware tools.
It's impossible to post on perl.announce an announce of a perl
shareware tool.
We've posted an aanounce of our perl shareware tool on perl.misc and
someone wrote to our ISP that we're spammer (is it not misc for
miscellaneus?)
We've seen that something is changing at http://use.perl.org/
We hope that perl comunity can open itself also to commercial tools.
We love perl, but it's not simple to us see that perl community don't
like our work.
On the other size we don't like to see that a more open mind language
like java (we hate it) is everywhere: in every University, in every
companies, in every products, ...
We hope this message can open a big discussion on perl community.
Fabrizio
P.S. We like the work of ActiveState and we think they made more in 2
years for the perl comunity that the perl comunity itself in 10 years.
The problem is not that for ActiveStare perl and python are the same.
Probably next year: perl, python, tcl, ....
------------------------------
Date: Tue, 12 Jun 2001 11:58:52 +0200
From: "Tom Klinger" <admin@the-piper.net>
Subject: Q: How to make a Perlscript Shareware?
Message-Id: <3b25e7e3$1@news.i-one.at>
Hi!
Maybe my idea differs from the base intention of perl that code is free.
From my point of view why not earn money with your code when it is used by a
company which makes finally money using your script while you have to
develope all that code?
Now, I want to go to develope 2 different versions of my software, one
so-called lite version with less features and options than the second
version, a so-called pro version with all enhancements.
My problem now is how to secure the code so that for example a pro version
will expire for example after 30 days or only runs if is already licensed?
I know that there are too many gurus out there who can modify the code,
sure.
But why not give it a try?
So my question now is if someone can give me a tip how to handle this or
maybe he can tell me the way how they're securing their code or methods to
purchase a software. Any information would be great.
Thanks in advance and for your time reading my written crap. ;)
Tom
------------------------------
Date: Tue, 12 Jun 2001 10:01:25 GMT
From: wine(out)@ono.com (Juanjo)
Subject: Script
Message-Id: <Xns90BE79A2EC4CAwineoutonocom@62.42.230.199>
Hi!
I'm trying to find a script that don't allow to write a certain character
in any of the form fields, displaying an alert message.
Thanks in advance.
Juanjo
------------------------------
Date: 12 Jun 2001 07:43:33 GMT
From: vek@pharmnl.ohout.pharmapartners.nl (Villy Kruse)
Subject: Re: system() and exec() don't execute but don't die either
Message-Id: <slrn9ibi15.uvr.vek@pharmnl.ohout.pharmapartners.nl>
On Mon, 11 Jun 2001 17:45:01 -0500, Katia Hayati <hayati@math.uiuc.edu> wrote:
>Hello,
>
>I have the following code:
>
>system("cat foo.txt | mail hayati\@math.uiuc.edu") == 0 or die $?;
>
>
>This doesn't die, but never sends the mail. The same command issued at a
>prompt works just fine. Replacing system() with exec() or backticks (and
>getting rid of the ' == 0') doesn't do any good. I have read the man
>pages on system() and exec() but still didn't see what I am doing wrong.
>Any help would be greatly appreciated.
>
>
When ytou system() a command with a pipe, the exit status is for
one of the processes only, in this case usualy the cat command.
Suggest you loose the cat command:
system("< foo.txt mail hayati\@math.uiuc.edu") == 0 or die $?;
or
system("mail hayati\@math.uiuc.edu < foo.txt") == 0 or die $?;
And also check what might be written to standard error, usualy the
terminal, but you could redirect STDERR to a file in perl before
you call system().
Villy
------------------------------
Date: 07 Jun 2001 08:48:03 +0100
From: nobull@mail.com
Subject: Re: Urgent : control code sequences?!?!
Message-Id: <u9g0dcy91u.fsf@wcl-l.bham.ac.uk>
"Brien Wankel" <brien@discover-net.net> writes:
> i have to send <esc>[<esc>0 to get to the command prompt that i need. i've tried
> @result = $session->cmd(String => "\033 [ \033 0", Prompt => '/MAX>/');
If you believe that you have to send <esc>[<esc>0 why do you actually send
<esc><space>[<space><esc><space>0 ?
> i've also tried to set up the key sequence as a string like this:
> $escseq = sprintf("\033","[", "\033", "0");
What do you think sprintf() does? Compare this to what it the manual
says it does. I think you'll find they are completely different.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Tue, 12 Jun 2001 09:20:16 +0200
From: Horst Fickenscher <horst.fickenscher@sealsystems.de>
Subject: Re: Vars, vars, vars...
Message-Id: <3B25C2B0.E10AAB55@sealsystems.de>
Ren Maddox wrote:
> The reason I shy away from this method is that it allows you to get by
> with a typo more easily. Usually, this isn't a problem as the "used
> only once" warning will still protect you, but I guess I'm just more
> comfortable with the explicit protection that lexical declarations
> provide (when combined with strictures, of course).
Ok, in Your first posting You suggested to use a hash ref $cfg
with key "timeout" e.g.
I use this method too sometimes, but one should be aware that it
doesn't protect against typos at all, not even with the "used only once"
warning:
$cfg->{timeuot} ist just undefined.
Cheers
--
Horst
------------------------------
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 1116
***************************************