[21800] in Perl-Users-Digest
Perl-Users Digest, Issue: 4004 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Oct 21 09:06:24 2002
Date: Mon, 21 Oct 2002 06:05:11 -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, 21 Oct 2002 Volume: 10 Number: 4004
Today's topics:
abort a sub-program <pef@trasig.noXX>
Re: abort a sub-program <kurzhalsflasche@netscape.net>
Re: abort a sub-program <usenet@tinita.de>
Re: abort a sub-program <bernard.el-hagin@DODGE_THISlido-tech.net>
converting TIFF to PNG/JPEG <clivev@emailco.co.za>
cyrpt() and other questions.... (havoc)
Re: cyrpt() and other questions.... <tassilo.parseval@post.rwth-aachen.de>
Re: dynamically named arrays (Tad McClellan)
Re: dynamically named arrays <stuff@nowhere.com>
Re: dynamically named arrays <tassilo.parseval@post.rwth-aachen.de>
exclusive execution of a perl script <saketrungta@hotmail.com>
Re: exclusive execution of a perl script <nobull@mail.com>
exec command (Theodore)
Re: exec command <josef.moellers@fujitsu-siemens.com>
Re: exec command (Anno Siegel)
Re: exec command <bart.lateur@pandora.be>
Re: GNU plot in perl <mgjv@tradingpost.com.au>
how to call java in perl? <liang@expert.ics.purdue.edu>
Image::Magick <dzluk8fsxsw0001@sneakemail.com>
New posters to comp.lang.perl.misc <gbacon@cs.uah.edu>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 21 Oct 2002 13:28:45 +0200
From: "Brutus" <pef@trasig.noXX>
Subject: abort a sub-program
Message-Id: <ap0oeu$6vk$1@oslo-nntp.eunet.no>
Like I abort a while-loop with the "last;" command,
I'd like to escape from a sub-routine in a
similar manner. Is there a 'magic word here that
do the trick?
I've looked for perldoc sub, perldoc die, perldoc last etc.
Thanks for a hint
Brit Uthus
------------------------------
Date: Mon, 21 Oct 2002 13:44:44 +0200
From: Dominik Seelow <kurzhalsflasche@netscape.net>
Subject: Re: abort a sub-program
Message-Id: <3DB3E8AC.9060208@netscape.net>
Brutus announced:
> Like I abort a while-loop with the "last;" command,
> I'd like to escape from a sub-routine in a
> similar manner. Is there a 'magic word here that
> do the trick?
> I've looked for perldoc sub, perldoc die, perldoc last etc.
>
> Thanks for a hint
>
> Brit Uthus
>
>
>
return?
Dominik
------------------------------
Date: 21 Oct 2002 11:43:28 GMT
From: Tina Mueller <usenet@tinita.de>
Subject: Re: abort a sub-program
Message-Id: <ap0p90$qm4pg$1@fu-berlin.de>
Brutus <pef@trasig.noxx> wrote:
> Like I abort a while-loop with the "last;" command,
> I'd like to escape from a sub-routine in a
> similar manner. Is there a 'magic word here that
> do the trick?
> I've looked for perldoc sub, perldoc die, perldoc last etc.
return;
hth, tina
--
http://www.tinita.de/ \ enter__| |__the___ _ _ ___
http://Movies.tinita.de/ \ / _` / _ \/ _ \ '_(_-< of
http://PerlQuotes.tinita.de/ \ \ _,_\ __/\ __/_| /__/ perception
------------------------------
Date: Mon, 21 Oct 2002 11:45:56 +0000 (UTC)
From: Bernard El-Hagin <bernard.el-hagin@DODGE_THISlido-tech.net>
Subject: Re: abort a sub-program
Message-Id: <slrnar7q3v.15m.bernard.el-hagin@gdndev25.lido-tech>
In article <ap0oeu$6vk$1@oslo-nntp.eunet.no>, Brutus wrote:
> Like I abort a while-loop with the "last;" command,
> I'd like to escape from a sub-routine in a
> similar manner. Is there a 'magic word here that
> do the trick?
> I've looked for perldoc sub, perldoc die, perldoc last etc.
perldoc -f return
> Thanks for a hint
Here's a hint:
perldoc perldoc
Cheers,
Bernard
--
echo 42|perl -pe '$#="Just another Perl hacker,"'
------------------------------
Date: Mon, 21 Oct 2002 10:56:30 +0200
From: "strontiumdogg" <clivev@emailco.co.za>
Subject: converting TIFF to PNG/JPEG
Message-Id: <3db3c01f$0$372$ff467cc4@host.example.com>
Hi
I need to extract multiple images from a TIFF file and save these as
multiple PNG or JPG files
I have managed to do this quite easily with ImageMagick (i think they refer
to it as PerlMagick)
This is going to be for some pretty high volume stuff, so I was wondering if
anyone is familiar with how robust ImageMagick is.
Also, if there is a better way of doing this. Could I do this simply using
GD?
Thanks,
Clive
------------------------------
Date: 21 Oct 2002 03:13:41 -0700
From: mike-_-@excite.com (havoc)
Subject: cyrpt() and other questions....
Message-Id: <d87cc458.0210210213.7f0b3fc9@posting.google.com>
Okay, i'm really new at this so please excuse me if my questions sound
idiotic. I'm trying to set up my own type of 'members only area'
without using .htpasswd. Specifically, when a user visits the member
area, they will be asked to login or register. Once the person logs in
I want them to be able to surf the members without having to relogin
on each page. Here are my problems:
I'm not at all familiar with crypt() and I found this snippet of code
on the net:
$salt1 = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789/.';
$salt = substr($salt1,rand(length($salt1)),1);
$salt .= substr($salt1,rand(length($salt1)),1);
$pass = "password";
$cpass = crypt($pass,$salt);
Now it appears that (please correct me if I am wrong) $salt is built
by selecting 2 random characters from $salt1, then passed to the crypt
function. Qustion: What exactly is the salt for?
Problem: When the user registers, I figured i'd store the encrypted
password in a specific file, and when the user logs in I also figured
I'd crypt the login pass and compare it to the stored pass, and if
they match then let the user in.
I planned on using the same snippet of code for each function (storing
and comparing) but if the salt is randomly selected, when the user
attempts to log in would the crypt function generate the same
encrypted password as the one created when they registered? If not,
the 2 ecrypted passwords would be different and the user would be
locked out even tho they entered the correct password, how would one
remedy this situation?
Lastly, how would I be able to have the pages and programs within the
members area recognize a user once they logged in so they can freely
surf around without having to relogin all the time? Should I set a
cookie with the user name and encrypted pass in it? I notice some
sites (like perlmonks) have a PHPSESSIONID or something like that when
a person logs in. If this is a better way, any info on this would be
appreciated. Thanks...
------------------------------
Date: 21 Oct 2002 10:36:20 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@post.rwth-aachen.de>
Subject: Re: cyrpt() and other questions....
Message-Id: <ap0lb4$le4$1@nets3.rz.RWTH-Aachen.DE>
Also sprach havoc:
> Okay, i'm really new at this so please excuse me if my questions sound
> idiotic. I'm trying to set up my own type of 'members only area'
> without using .htpasswd. Specifically, when a user visits the member
> area, they will be asked to login or register. Once the person logs in
> I want them to be able to surf the members without having to relogin
> on each page. Here are my problems:
>
> I'm not at all familiar with crypt() and I found this snippet of code
> on the net:
>
> $salt1 = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789/.';
> $salt = substr($salt1,rand(length($salt1)),1);
> $salt .= substr($salt1,rand(length($salt1)),1);
> $pass = "password";
> $cpass = crypt($pass,$salt);
Better written as:
my $salt;
$salt .= ('A'..'Z', 'a'..'z', 0..9, '/', '.')[rand 64] for 0, 1;
my $crypted = crypt $pass, $salt;
Also, read 'perldoc -f crypt'. I don't think you already did. ;-)
> Now it appears that (please correct me if I am wrong) $salt is built
> by selecting 2 random characters from $salt1, then passed to the crypt
> function. Qustion: What exactly is the salt for?
The salt is a two character string which is always prepended to the
encrypted string. With a salt of 'AB', the encrypted string always looks
like that:
AB<odd_string>
Whenever you have the real password in plain and the encrypted one, you
can do the following check:
if ($crypted eq crypt $plain, $crypted) {
print "Password ok\n";
}
This works, since $crypted's first two characters are the salt. When you
pass a salt to crypt() that exceeds the length of two, crypt() will only
take the first two characters.
> Problem: When the user registers, I figured i'd store the encrypted
> password in a specific file, and when the user logs in I also figured
> I'd crypt the login pass and compare it to the stored pass, and if
> they match then let the user in.
That's also what login does on UNIXish systems when shadowed passwords
are used.
> I planned on using the same snippet of code for each function (storing
> and comparing) but if the salt is randomly selected, when the user
> attempts to log in would the crypt function generate the same
> encrypted password as the one created when they registered? If not,
> the 2 ecrypted passwords would be different and the user would be
> locked out even tho they entered the correct password, how would one
> remedy this situation?
To check, you have to use the same salt for encryption and the check
itself. The thing is that you create the hashed password only once. The
salt that was used s the first two characters of the encrypted string.
> Lastly, how would I be able to have the pages and programs within the
> members area recognize a user once they logged in so they can freely
> surf around without having to relogin all the time? Should I set a
> cookie with the user name and encrypted pass in it? I notice some
> sites (like perlmonks) have a PHPSESSIONID or something like that when
> a person logs in. If this is a better way, any info on this would be
> appreciated. Thanks...
That's beyond the scope of this group. You indeed have to use some sort
of sessions to track that down. There is Apache::Session for instance
that can create a session-id and store in various kinds of databases.
Tassilo
--
$_=q!",}])(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus;})(rekcah{lrePbus;})(lreP{rehtonabus;})(rehtona{tsuJbus!;
$_=reverse;s/sub/(reverse"bus").chr(32)/xge;tr~\n~~d;eval;
------------------------------
Date: Sun, 20 Oct 2002 23:40:45 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: dynamically named arrays
Message-Id: <slrnar71ad.cov.tadmc@magna.augustmail.com>
mostuff <stuff@nowhere.com> wrote:
[snip: wants to use Symbolic References]
> what i'd like to know if how i create an array like
> that where the first 2 characters of the array are the type of file it is.
^^^^^^^^^^^^
You mean "of the array's name", I think.
Don't do it!
See this Perl FAQ:
"How can I use a variable as a variable name?"
And these:
http://www.plover.com/~mjd/perl/varvarname.html
http://www.plover.com/~mjd/perl/varvarname2.html
http://www.plover.com/~mjd/perl/varvarname3.html
Then use a hash to hold the arrays.
---------------------------------
#!/usr/bin/perl
use warnings;
use strict;
use Data::Dumper;
my @files = qw/ vs010101.000 ud010101.000 eq010101.000
vs030303.000 ud030303.000 eq030303.000
vs020202.000 ud020202.000 eq020202.000 /;
my $filetypes = 'vs|ud|eq';
my %modtime;
foreach (@files) {
if ( /^($filetypes)/ ) {
push(@{ $modtime{$1} }, "find modtime for file $_");
}
else {
warn "'$1' is an unknown file type\n";
}
}
print Dumper %modtime;
---------------------------------
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 21 Oct 2002 16:29:36 +1000
From: "mostuff" <stuff@nowhere.com>
Subject: Re: dynamically named arrays
Message-Id: <Q9Ns9.254$P5.22373@nasal.pacific.net.au>
"Tad McClellan" <tadmc@augustmail.com> wrote in message
news:slrnar71ad.cov.tadmc@magna.augustmail.com...
> mostuff <stuff@nowhere.com> wrote:
>
>
> [snip: wants to use Symbolic References]
>
>
> > what i'd like to know if how i create an array like
> > that where the first 2 characters of the array are the type of file it
is.
> ^^^^^^^^^^^^
>
> You mean "of the array's name", I think.
>
> Don't do it!
>
> See this Perl FAQ:
>
> "How can I use a variable as a variable name?"
>
> And these:
>
> http://www.plover.com/~mjd/perl/varvarname.html
> http://www.plover.com/~mjd/perl/varvarname2.html
> http://www.plover.com/~mjd/perl/varvarname3.html
>
> Then use a hash to hold the arrays.
>
> ---------------------------------
> #!/usr/bin/perl
> use warnings;
> use strict;
> use Data::Dumper;
>
> my @files = qw/ vs010101.000 ud010101.000 eq010101.000
> vs030303.000 ud030303.000 eq030303.000
> vs020202.000 ud020202.000 eq020202.000 /;
>
> my $filetypes = 'vs|ud|eq';
> my %modtime;
>
> foreach (@files) {
> if ( /^($filetypes)/ ) {
> push(@{ $modtime{$1} }, "find modtime for file $_");
> }
> else {
> warn "'$1' is an unknown file type\n";
> }
> }
>
> print Dumper %modtime;
> ---------------------------------
>
>
> --
> Tad McClellan SGML consulting
> tadmc@augustmail.com Perl programming
> Fort Worth, Texas
thanx for that. i've inlcuded the line
push(@{$ModTime{$Type}},$RemoteTime);
at the end data::dumper prints
$VAR1 = 'eq';
$VAR2 = [
'1034913862',
'1034913863',
'1034913865'
];
$VAR3 = 'ud';
$VAR4 = [
'1034913856',
'1034913857',
'1034913859'
];
$VAR5 = 'vs';
$VAR6 = [
'1034913915',
'1034913852',
'1034913854'
];
i'm not sure if thats what i'm after or not - i've never used hashes myself.
what i think i would need is a hash with each file type and then underneath
each file type the modification time of each file of that type that was
downloaded. how then do i print each modification time? or more importantly,
how do i sort the times?
------------------------------
Date: 21 Oct 2002 07:25:05 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@post.rwth-aachen.de>
Subject: Re: dynamically named arrays
Message-Id: <ap0a4h$a0s$1@nets3.rz.RWTH-Aachen.DE>
Also sprach mostuff:
> "Tad McClellan" <tadmc@augustmail.com> wrote in message
> news:slrnar71ad.cov.tadmc@magna.augustmail.com...
[ avoiding symrefs ]
>> #!/usr/bin/perl
>> use warnings;
>> use strict;
>> use Data::Dumper;
>>
>> my @files = qw/ vs010101.000 ud010101.000 eq010101.000
>> vs030303.000 ud030303.000 eq030303.000
>> vs020202.000 ud020202.000 eq020202.000 /;
>>
>> my $filetypes = 'vs|ud|eq';
>> my %modtime;
>>
>> foreach (@files) {
>> if ( /^($filetypes)/ ) {
>> push(@{ $modtime{$1} }, "find modtime for file $_");
>> }
>> else {
>> warn "'$1' is an unknown file type\n";
>> }
>> }
>>
>> print Dumper %modtime;
> thanx for that. i've inlcuded the line
> push(@{$ModTime{$Type}},$RemoteTime);
>
> at the end data::dumper prints
>
> $VAR1 = 'eq';
> $VAR2 = [
> '1034913862',
> '1034913863',
> '1034913865'
> ];
> $VAR3 = 'ud';
[...]
> i'm not sure if thats what i'm after or not - i've never used hashes myself.
> what i think i would need is a hash with each file type and then underneath
> each file type the modification time of each file of that type that was
This is actually the case but hidden by the Dumper-statement since it
was passed a list. Instead, dump a reference to the hash:
print Dumper \%modtime;
> downloaded. how then do i print each modification time? or more importantly,
> how do i sort the times?
You have a hash that holds references to an array. So you you iterate
over the hash with a simple each(). The sorting can be done here as well
on the fly:
while (my ($key, $val) = each %modtime) {
# $val is an array-ref, therefore dereference it
@$val = sort { $a <=> $b } @$val;
print "$key: ", join " ", @$val;
}
Have you read 'perldoc perlreftut|perlref|perldsc' already? There are
also a few FAQs dealing with sorting. See 'perldoc -q sort'.
Tassilo
--
$_=q!",}])(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus;})(rekcah{lrePbus;})(lreP{rehtonabus;})(rehtona{tsuJbus!;
$_=reverse;s/sub/(reverse"bus").chr(32)/xge;tr~\n~~d;eval;
------------------------------
Date: Mon, 21 Oct 2002 11:47:05 +0100
From: "Saket Rungta" <saketrungta@hotmail.com>
Subject: exclusive execution of a perl script
Message-Id: <ap0m3s$ulq$1@sp15at20.hursley.ibm.com>
If cron runs perl script ocassionally and we need to check whether previous
run finished, how should it be done (elegantly)?
(without temp files writing usage, without killing all perl on ps etc.)
Thanks,
Saket
IBM Hursley
------------------------------
Date: 21 Oct 2002 13:58:40 +0100
From: Brian McCauley <nobull@mail.com>
Subject: Re: exclusive execution of a perl script
Message-Id: <u9iszwaqyn.fsf@wcl-l.bham.ac.uk>
"Saket Rungta" <saketrungta@hotmail.com> writes:
> If cron runs perl script ocassionally and we need to check whether previous
> run finished, how should it be done (elegantly)?
This has nothing to do with Perl.
> (without temp files writing usage, without killing all perl on ps etc.)
There are basically two approaches:
The pidfile/lockfile.
This is a file that is created atomically when the process starts
and is deleted when it ends. If the file exists the process refuses
to start. In the pidfile varient the file contains the PID of the
process and is deleted if that process is no longer running.
The lock/semephore.
Some resource (e.g. a file) is exclusively locked. This has the
advantage (or, in some contexts, disadvantage) that if the program
fails unexpectedly the resource is freed.
Personally, in Perl, I favour the second one using the flock()
function on a file.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: 20 Oct 2002 23:57:44 -0700
From: crandall5138@msn.com (Theodore)
Subject: exec command
Message-Id: <d98ac6f5.0210202257.7e495b10@posting.google.com>
I am trying to write a perl script to open new links in a new tab as
opposed to a new window.
The command
mozilla -remote "openURL(URL, new-tab)"
does it fine.
I have
$prog = "/usr/bin/mozilla";
$arg = "-remote \"openURL(" . $URL . ", new-tab)\"";
exec $prog, $arg;
I have tested that the above command and the one executed by my script
are the same, yet when I run the perl script mozilla complains that
the default profile is in use and I must create another.
Does the perl script run programs any differently (ie as user perl or
somthing?). And if so, what can I do so that the script executes the
command the same way it is done by command line??
Thanks for any help!
------------------------------
Date: Mon, 21 Oct 2002 09:09:56 +0200
From: Josef =?iso-8859-1?Q?M=F6llers?= <josef.moellers@fujitsu-siemens.com>
Subject: Re: exec command
Message-Id: <3DB3A843.2A52EDD1@fujitsu-siemens.com>
Theodore wrote:
> =
> I am trying to write a perl script to open new links in a new tab as
> opposed to a new window.
> =
> The command
> mozilla -remote "openURL(URL, new-tab)"
> does it fine.
> =
> I have
> =
> $prog =3D "/usr/bin/mozilla";
> =
> $arg =3D "-remote \"openURL(" . $URL . ", new-tab)\"";
> =
> exec $prog, $arg;
> =
> I have tested that the above command and the one executed by my script
> are the same, yet when I run the perl script mozilla complains that
> the default profile is in use and I must create another.
> =
> Does the perl script run programs any differently (ie as user perl or
> somthing?). And if so, what can I do so that the script executes the
> command the same way it is done by command line??
I haven't used exec often enough to be an expert, but I've had similar
problems in other programming languages before. It may be that Perl
passes the quotes to in the argument list or even passes '-remote
"openURL($URL, new-tab)"' as a single argument.
Have you tried
$prog =3D "/usr/bin/mozilla";
@args =3D ("-remote", "openURL($URL, new-tab)");
exec $prog, @args;
Josef
-- =
Josef M=F6llers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize
-- T. Pratchett
------------------------------
Date: 21 Oct 2002 07:27:21 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: exec command
Message-Id: <ap0a8p$o81$1@mamenchi.zrz.TU-Berlin.DE>
According to Theodore <crandall5138@msn.com>:
> I am trying to write a perl script to open new links in a new tab as
> opposed to a new window.
>
> The command
> mozilla -remote "openURL(URL, new-tab)"
> does it fine.
>
> I have
>
> $prog = "/usr/bin/mozilla";
>
> $arg = "-remote \"openURL(" . $URL . ", new-tab)\"";
>
> exec $prog, $arg;
>
> I have tested that the above command and the one executed by my script
> are the same, yet when I run the perl script mozilla complains that
> the default profile is in use and I must create another.
>
> Does the perl script run programs any differently (ie as user perl or
> somthing?). And if so, what can I do so that the script executes the
> command the same way it is done by command line??
Exec takes commands either as a single string, or as a list where
the command name and every single argument are list elements.
You are mixing the two forms, giving the command name in one list
element and all (two) arguments in the other. As you have noticed,
this doesn't work. Try 'exec "$prog $arg"' for a single string,
or, better, use the strict list form.
Anno
------------------------------
Date: Mon, 21 Oct 2002 08:50:23 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: exec command
Message-Id: <oae7rus10u72e6q8jckn90j8gdqeuo352d@4ax.com>
Theodore wrote:
>I am trying to write a perl script to open new links in a new tab as
>opposed to a new window.
>
>The command
>mozilla -remote "openURL(URL, new-tab)"
>does it fine.
That looks like a 3 part command line to me.
>I have
>
>$prog = "/usr/bin/mozilla";
>
>$arg = "-remote \"openURL(" . $URL . ", new-tab)\"";
>
>exec $prog, $arg;
Here you only have two parts. Try
exec "mozilla", "-remote", "openURL($URL, new-tab)";
or
exec "mozilla -remote \"openURL($URL, new-tab)\"";
In the latter case, the shell will split up the arguments for you.
I think these double quotes in the command line are something typical
for Windows, replace them with single quotes on Unixy platforms.
p.s. Are you sure you want to run this on the same system as the browser
is on? It looks to me like a CGI question in disguise, and then I think
you actually want to run this through Javascript. Not sure that it could
work, though. I've looked around, and haven't found anything.
--
Bart.
------------------------------
Date: Mon, 21 Oct 2002 07:05:19 GMT
From: Martien Verbruggen <mgjv@tradingpost.com.au>
Subject: Re: GNU plot in perl
Message-Id: <slrnar79sa.kud.mgjv@verbruggen.comdyn.com.au>
On 20 Oct 2002 21:04:42 -0700,
Anirban Chakraborti <achakrab@nmsu.edu> wrote:
> hi,
> I am using GNU plot function in perl.I am able to use it
> properly when i initalize the x and y axis arrays in the function.But
> I am not able to initialise it outside the function at run time.Like
> say the x and y axis arrays may be filled by a for loop and the loop
> is outside the function but in the same program.but it doesn't work???
What is the code you're using? It isn't clear at all from your rather
vague description what the problem is, or even what you are talking
about.
Martien
--
|
Martien Verbruggen | I used to have a Heisenbergmobile. Every
Trading Post Australia | time I looked at the speedometer, I got
| lost.
------------------------------
Date: Mon, 21 Oct 2002 05:06:53 -0500
From: Hong Liang <liang@expert.ics.purdue.edu>
Subject: how to call java in perl?
Message-Id: <Pine.GSO.4.44.0210210504410.17995-100000@expert.ics.purdue.edu>
Hi,
can anyone present a somewhat full list of
ways for calling other programs from Perl,
such as Java class?
thanks,
------------------------------
Date: Mon, 21 Oct 2002 09:22:19 +0200
From: "Jonas Nilsson" <dzluk8fsxsw0001@sneakemail.com>
Subject: Image::Magick
Message-Id: <ap09v4$511$1@news.island.liu.se>
I can't seem to get what I want...
I need to be able to just add some empty lines to the right or at the bottom
of the picture.
Now, I use Montage which feels like sub-optimal. Like this:
$res=$p->Read($file); warn "$res" if "$res";
$p->Set('compression'=>'none');
$res=$p->Crop(geometry=>'100x100+10+90'); warn "$res" if "$res";
my $p2=$p->Montage(geometry=>'100x150',gravity=>'northwest'); # 50 empty
line at the bottom...
$res=$p2->Crop(geometry=>'100x150'); warn "$res" if "$res"; #
Montage adds two extra unwanted
#lines at the bottom - allways?!?!
$res=$p2->Write(filename=>"out.tif"); warn "$res" if "$res";
Please assist me...
/jN
------------------------------
Date: Mon, 21 Oct 2002 12:14:08 -0000
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: New posters to comp.lang.perl.misc
Message-Id: <ur7rsg2h6fve6d@corp.supernews.com>
Following is a summary of articles from new posters spanning a 7 day
period, beginning at 14 Oct 2002 12:16:04 GMT and ending at
21 Oct 2002 11:44:44 GMT.
Notes
=====
- A line in the body of a post is considered to be original if it
does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
- All text after the last cut line (/^-- $/) in the body is
considered to be the author's signature.
- The scanner prefers the Reply-To: header over the From: header
in determining the "real" email address and name.
- Original Content Rating (OCR) is the ratio of the original content
volume to the total body volume.
- Find the News-Scan distribution on the CPAN!
<URL:http://www.perl.com/CPAN/modules/by-module/News/>
- Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
- Copyright (c) 2002 Greg Bacon.
Verbatim copying and redistribution is permitted without royalty;
alteration is not permitted. Redistribution and/or use for any
commercial purpose is prohibited.
Totals
======
Posters: 85 (33.1% of all posters)
Articles: 149 (17.4% of all articles)
Volume generated: 306.1 kb (17.8% of total volume)
- headers: 121.8 kb (2,457 lines)
- bodies: 165.5 kb (5,600 lines)
- original: 118.0 kb (4,147 lines)
- signatures: 18.7 kb (546 lines)
Original Content Rating: 0.713
Averages
========
Posts per poster: 1.8
median: 1 post
mode: 1 post - 50 posters
s: 1.5 posts
Message size: 2103.6 bytes
- header: 836.8 bytes (16.5 lines)
- body: 1137.3 bytes (37.6 lines)
- original: 811.2 bytes (27.8 lines)
- signature: 128.4 bytes (3.7 lines)
Top 10 Posters by Number of Posts
=================================
(kb) (kb) (kb) (kb)
Posts Volume ( hdr/ body/ orig) Address
----- -------------------------- -------
6 11.2 ( 5.0/ 6.2/ 3.1) xach@xach.com
6 11.4 ( 6.0/ 5.4/ 3.3) "Nemo Oudeheis" <nikogo@nigde.net>
5 8.4 ( 3.6/ 4.8/ 3.2) MMichalow <michalowski@interred.de>
5 16.2 ( 4.1/ 12.1/ 9.4) Bodo Schulze <bobesch@letras.net>
4 7.1 ( 4.1/ 3.0/ 2.4) Cosmic Cruizer <XcosmicX.XcruizerX@sbcglobal.com>
3 3.6 ( 2.6/ 1.0/ 0.6) Mark Healey <admin@hotmail.com>
3 3.3 ( 2.1/ 1.1/ 1.1) Soon <scyeang@hotmail.com>
3 5.6 ( 2.3/ 3.2/ 1.1) Patrick <patrick@-/abazar\-.nl>
3 4.3 ( 2.6/ 1.7/ 0.8) Hong Liang <liang@expert.ics.purdue.edu>
3 5.9 ( 3.1/ 1.7/ 1.0) Frank Winkler - Sun Germany - Enterprise Services <frank.winkler@sun.com>
These posters accounted for 4.8% of all articles.
Top 10 Posters by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Address
-------------------------- ----- -------
29.4 ( 0.8/ 28.5/ 26.7) 1 "Maurice Moolenaar" <m.moolenaar@mdc-international.com>
27.3 ( 1.5/ 11.6/ 5.6) 2 "Smith, Aaron" <asmith2@rational.com>
16.2 ( 4.1/ 12.1/ 9.4) 5 Bodo Schulze <bobesch@letras.net>
11.4 ( 6.0/ 5.4/ 3.3) 6 "Nemo Oudeheis" <nikogo@nigde.net>
11.2 ( 5.0/ 6.2/ 3.1) 6 xach@xach.com
8.4 ( 3.6/ 4.8/ 3.2) 5 MMichalow <michalowski@interred.de>
7.4 ( 1.4/ 3.5/ 3.4) 2 "J. Reilink" <digiover@dsinet.org>
7.4 ( 2.5/ 4.6/ 1.5) 3 cmustard@nyc.rr.com
7.1 ( 4.1/ 3.0/ 2.4) 4 Cosmic Cruizer <XcosmicX.XcruizerX@sbcglobal.com>
7.1 ( 3.1/ 4.0/ 1.9) 3 "Christian Kappler" <uzshaf@uni-bonn.de>
These posters accounted for 7.7% of the total volume.
Top 10 Posters by OCR (minimum of three posts)
==============================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
1.000 ( 1.1 / 1.1) 3 Soon <scyeang@hotmail.com>
1.000 ( 2.2 / 2.2) 3 "Kashmir" <kashmirnospam@bellnet.ca>
0.979 ( 1.1 / 1.1) 3 Will Lee <willee1@hotmail.com>
0.808 ( 0.9 / 1.1) 3 "Evert" <linux@dds.nl>
0.804 ( 2.4 / 3.0) 4 Cosmic Cruizer <XcosmicX.XcruizerX@sbcglobal.com>
0.782 ( 9.4 / 12.1) 5 Bodo Schulze <bobesch@letras.net>
0.775 ( 2.7 / 3.5) 3 Peter Erl <p76e160a4@hotmail.com>
0.656 ( 3.2 / 4.8) 5 MMichalow <michalowski@interred.de>
0.599 ( 3.3 / 5.4) 6 "Nemo Oudeheis" <nikogo@nigde.net>
0.597 ( 1.0 / 1.7) 3 Frank Winkler - Sun Germany - Enterprise Services <frank.winkler@sun.com>
Bottom 10 Posters by OCR (minimum of three posts)
=================================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
0.599 ( 3.3 / 5.4) 6 "Nemo Oudeheis" <nikogo@nigde.net>
0.597 ( 1.0 / 1.7) 3 Frank Winkler - Sun Germany - Enterprise Services <frank.winkler@sun.com>
0.573 ( 1.0 / 1.8) 3 Markus Niederlechner <mniederlechner@gmx.net>
0.562 ( 0.6 / 1.0) 3 Mark Healey <admin@hotmail.com>
0.505 ( 3.1 / 6.2) 6 xach@xach.com
0.471 ( 0.8 / 1.7) 3 Hong Liang <liang@expert.ics.purdue.edu>
0.466 ( 1.9 / 4.0) 3 "Christian Kappler" <uzshaf@uni-bonn.de>
0.465 ( 0.5 / 1.0) 3 edvjacek <jacek@pc1.ips.lodz.pl>
0.349 ( 1.1 / 3.2) 3 Patrick <patrick@-/abazar\-.nl>
0.327 ( 1.5 / 4.6) 3 cmustard@nyc.rr.com
18 posters (21%) had at least three posts.
Top 10 Targets for Crossposts
=============================
Articles Newsgroup
-------- ---------
10 comp.lang.perl.modules
3 alt.perl
3 comp.lang.perl
2 sci.geo.earthquakes
2 comp.programming
2 alt.disasters.misc
2 sci.geo.geology
1 comp.infosystems.www.authoring.cgi
Top 10 Crossposters
===================
Articles Address
-------- -------
6 "\(#} jpturcaud" <mining_pioneer@hotmail.com>
2 100.17706@germanynet.de
1 "JorkkiS" <jarkko.rantamaki@edu.stadia.no.spam.fi>
0 lcdn@inwind.it
0 Dan M <boss@moraldecay.com>
0 Patrick <patrick@-/abazar\-.nl>
0 Hong Liang <liang@expert.ics.purdue.edu>
0 raj guy <rchacko@draftnet.com>
0 Frank Winkler - Sun Germany - Enterprise Services <frank.winkler@sun.com>
0 bielak.antoine@free.fr
------------------------------
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 4004
***************************************