[7902] in Perl-Users-Digest
Perl-Users Digest, Issue: 1527 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Dec 23 08:08:14 1997
Date: Tue, 23 Dec 97 05:00:45 -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 Tue, 23 Dec 1997 Volume: 8 Number: 1527
Today's topics:
Re: 1.lexicals 2.use vs require (Mike Stok)
[NEED HELP] making thumbnails (joshua)
Re: [NEED HELP] making thumbnails <bugaj@bell-labs.com>
Re: Bidirectional IPC with long strings <dboyce@mediaone.net>
Re: Bidirectional IPC with long strings <tex@spambitesmynads.habit.com>
book on perl <daftary@cisco.com>
Re: book on perl (brian d foy)
Re: book on perl (Martien Verbruggen)
Re: Fast Suggestions for this string manipulation probl <yrenoue@businessobjects.com>
Re: Fast Suggestions for this string manipulation probl <ckc@dmi.dk>
Re: HELP! Bitwise XOR (^) doesn't work on strings? (Bart Lateur)
Re: HELP! Bitwise XOR (^) doesn't work on strings? (Bart Lateur)
how to suppress a warning snailgem@aol.com
Re: how to suppress a warning (brian d foy)
Re: LWP for Windows <blue-sin-sation@usa.net>
Re: Newbie Help: Removing or ReDimensioning an Array <irsan@tcf.nl>
Re: next == continue?? (Marek Rouchal)
Re: next == continue?? nospam@minivend.com
Re: Perl 5.004_04 on MP-RAS problems. (Mike Wescott)
perl <STDOUT> to gnuplot <STDIN> <kelly@pcocd2.intel.com>
Re: pgp encrypion via perl script (Michael Budash)
Re: Q: what does __ do ? <#@qz.to>
Shortcut <robnet@hem1.passagen.se>
Re: Shortcut nospam@minivend.com
Re: Which language pays most 17457 -- C++ vs. Java? <rXXX.caffin@tpgi.com.au>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 23 Dec 1997 12:13:45 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: 1.lexicals 2.use vs require
Message-Id: <slrn69vasr.nc.mike@stok.co.uk>
On Mon, 22 Dec 1997 21:48:00 -0500, snailgem@aol.com <snailgem@aol.com> wrote:
>1.What exactly are 'lexicals' in Perl?
>2.Can somebody give me a practical example of someting you can do in a
>script if you use 'use whateverlib.pl' that can't be if you had 'require
>whateverlib.pl'
Lexical vs. dynamic scoping is diuscussed in the FAQ, on the web at
http://www.perl.com at
/CPAN-local/doc/manual/html/pod/perlfaq7/What_s_the_diference_betwen_dy.html
or if you have a recent perl then
perldoc perlfaq7
might get it for you.
According to the manual page for perlfunc:
use Module LIST
use Module
use Module VERSION LIST
use VERSION
Imports some semantics into the current package
from the named module, generally by aliasing
certain subroutine or variable names into your
package. It is exactly equivalent to
BEGIN { require Module; import Module LIST; }
except that Module must be a bareword.
[...]
The BEGIN forces the require and import to happen
at compile time. The require makes sure the
module is loaded into memory if it hasn't been
yet. The import is not a builtin--it's just an
ordinary static method call into the "Module"
package to tell the module to import the list of
features back into the current package. The
module can implement its import method any way it
likes, though most modules just choose to derive
their import method via inheritance from the
Exporter class that is defined in the Exporter
module. See the Exporter manpage. If no import
method can be found then the error is currently
silently ignored. This may change to a fatal
error in a future version.
If you don't want your namespace altered,
explicitly supply an empty list:
use Module ();
That is exactly equivalent to
BEGIN { require Module; }
so a use happens ar compile time rather than run time and can import
symbols.
Hope this helps,
Mike
--
mike@stok.co.uk | The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/ | PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/ | 65 F3 3F 1D 27 22 B7 41
stok@colltech.com | Collective Technologies (work)
------------------------------
Date: Tue, 23 Dec 1997 10:42:49 GMT
From: joshua@moon.jic.com (joshua)
Subject: [NEED HELP] making thumbnails
Message-Id: <67o4u6$jep@news2.jic.com>
is that possible to make thumbnails graphic images by using perl??
If yes.. please show me any source file..
thanks in advance
------------------------------
Date: Tue, 23 Dec 1997 06:39:54 -0500
From: Stephan Vladimir Bugaj <bugaj@bell-labs.com>
Subject: Re: [NEED HELP] making thumbnails
Message-Id: <349FA30A.41C6@bell-labs.com>
> is that possible to make thumbnails graphic images by using perl??
>
> If yes.. please show me any source file..
>
> thanks in advance
>
http://reference.perl.com/query.cgi?graphics
GD will let you import a gif, copy resized, and write out
a shrunken image
Image::Size module will get you h & w of the existing image
LL+P,
Stephan
"Do computers think?"
---------------------------------------------------------------
Stephan Vladimir Bugaj, Multimedia Communication Research Dept.
Departmental Website: http://www.multimedia.bell-labs.com
PGPkey from http://www.pgp.net/wwwkeys.html or other keyservers
Non-Lucent website: http://www.cthulhu-dynamics.com/stephan
FAQs: http://www.cthulhu-dynamics.com/tech/metametafaq.html
---------------------------------------------------------------
STANDARD DISCLAIMER:My opinions are NOT those of LUCENT
---------------------------------------------------------------
"Do submarines swim?" - E.W. Dijkstra
------------------------------
Date: Mon, 22 Dec 1997 23:25:46 -0500
From: David Boyce <dboyce@mediaone.net>
To: Tom Tom Harrington <tph@rmi.net>
Subject: Re: Bidirectional IPC with long strings
Message-Id: <349F3D4A.675E1148@mediaone.net>
Tom Tom Harrington wrote:
>
> I'm developing a Perl script that controls a shell-like application
> using bidirectional IPC. I had been using Comm.pl's "expect" to
> grab the app's output, but I ran into a nasty snag: The app in
> question often returns strings well in excess of 256 characters.
> And since Comm.pl uses ptys, "expect" chokes and dies when this
> happens.
>
> I'm experimenting with using IPC::Open2 to start the process, and
> then using sysread to grab the output. It works pretty well
> except that it misses the shell prompts from the subprocess.
> Since the app performs operations that can take several hours,
> sometimes pausing for long periods, I've been using the prompt
> as a marker to indicate that it's done. This worked well enough
> with expect, until I hit the long output strings.
>
> Can anyone recommend an effective way to do expect-like operations
> while handling output strings longer than 256 chars? I notice that
> the perlipc man page refers to IPC::Chat as the successor to Comm.pl,
> but I haven't been able to track down that module.
IPC::Chat has been in RSN-mode for a long time, I believe. You might
want to take a look at my website (http://www.clearguide.com) for a
module called IPC:Copro which could provide an alternate solution,
depending on how shell-like your application is. This is a module in the
IPC family (obviously) which controls a child process by sending it two
commands each time; one is the real command and the second is a trivial
"tag" command. You know the real command has finished when the output
from the tag command arrives. E.g. if you were running the ksh as a
child process you could use 'print +++EOT+++' as the tag command. Thus
it will work well with any application for which you can identify a
suitable trivial command.
David Boyce
------------------------------
Date: Tue, 23 Dec 1997 03:28:52 -0800
From: RHS Linux User <tex@spambitesmynads.habit.com>
Subject: Re: Bidirectional IPC with long strings
Message-Id: <349FA074.492D27BE@spambitesmynads.habit.com>
David Boyce wrote:
>
> Tom Tom Harrington wrote:
> >
> > I'm developing a Perl script that controls a shell-like application
> > using bidirectional IPC. I had been using Comm.pl's "expect" to
> > grab the app's output, but I ran into a nasty snag: The app in
> > question often returns strings well in excess of 256 characters.
> > And since Comm.pl uses ptys, "expect" chokes and dies when this
> > happens.
Please try the relatively new Expect module. It is available via CPAN
in Austin Schutz's (me) directory. Expect was written as a more portable
and more Tcl-Expect-like successor to Comm.pl.
Expect also uses ptys, though I haven't run in to any sort of return
limit. It's possible to set one should you wish to keep the amount of
output scanned to a minimum (and thus run faster during complex regex
matching).
If you do end up using it, please feel free to send any comments you
have.
Tbanks,
Austin
------------------------------
Date: Mon, 22 Dec 1997 20:07:49 -0800
From: "Kuntal M. Daftary" <daftary@cisco.com>
Subject: book on perl
Message-Id: <Pine.GSO.3.96.971222200508.6935A-100000@daftary-ultra.cisco.com>
i have "programming perl" book which describes perl 4. so is there a "bible" on
perl 5 like "programming perl" ?
basically i would like to get familiar with the new features in perl 5 like
extended regexes and the new commands and OOPs.
------------------------------
Date: Tue, 23 Dec 1997 00:23:42 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: book on perl
Message-Id: <comdog-ya02408000R2312970023420001@news.panix.com>
Keywords: from just another new york perl hacker
In article <Pine.GSO.3.96.971222200508.6935A-100000@daftary-ultra.cisco.com>, "Kuntal M. Daftary" <daftary@cisco.com> wrote:
>i have "programming perl" book which describes perl 4. so is there a "bible" on
>perl 5 like "programming perl" ?
yes, it's called "Programming Perl" [1], which is the second edition of
"Programming perl".
[1]
Programming Perl
Larry Wall, Tom Christensen & Randal L. Schwartz
ISBN 1-56592-149-6
<URL:http://www.oreilly.com>
--
brian d foy <comdog@computerdog.com>
Meta Meta FAQ <URL:http://computerdog.com/Meta_MetaFAQ.html>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: 23 Dec 1997 05:37:05 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: book on perl
Message-Id: <67nim1$7ql$1@comdyn.comdyn.com.au>
In article <Pine.GSO.3.96.971222200508.6935A-100000@daftary-ultra.cisco.com>,
"Kuntal M. Daftary" <daftary@cisco.com> writes:
> i have "programming perl" book which describes perl 4. so is there a "bible"
> on perl 5 like "programming perl" ?
Programming Perl, second edition.
have a look at http://language.perl.com/info/documentation.html
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | If it isn't broken, it doesn't have
Commercial Dynamics Pty. Ltd. | enough features yet.
NSW, Australia |
------------------------------
Date: Tue, 23 Dec 1997 12:05:01 +0100
From: Yves Renoue <yrenoue@businessobjects.com>
To: Mark Worsdall <shadowweb@worsdall.demon.co.uk>
Subject: Re: Fast Suggestions for this string manipulation problem
Message-Id: <349F9ADD.9A602D7F@businessobjects.com>
I'm facing the same problem but in more global way.
Imagine variable $a="bcjhbf xxxx sdfncje xxxx....etc...";
Of course bcjhbf stand for any character even one x or two but not a
list of four.
How could I substitute the first pattern (and only the first) "bcjhbf
xxxx" by something.
As you probably know the substitution $a =~ s/.*xxxx(.*)/something/ will
get the last match of xxxx !
Thanks anyone for help on this tricky problem.
Yves Renoue
Business Objects
------------------------------
Date: 23 Dec 1997 12:35:09 +0100
From: Casper Kvan Clausen <ckc@dmi.dk>
Subject: Re: Fast Suggestions for this string manipulation problem
Message-Id: <wvp1zz4pa1e.fsf@edb.ejoper.dmi.min.dk>
Yves Renoue <yrenoue@businessobjects.com> writes:
> As you probably know the substitution $a =~ s/.*xxxx(.*)/something/ will
> get the last match of xxxx !
So make it s/.*?xxxx(.*)/something $1/,
^
using the non-greedy companion of *, *?.
Kvan.
--
-------Casper Kvan Clausen------ | 'Ah, Warmark, everything that passes
----------<ckc@dmi.dk>---------- | unattempted is impossible.'
Lokal 544 |
I do not speak for DMI, just me. | - Lord Mhoram, Son of Variol.
------------------------------
Date: Tue, 23 Dec 1997 08:56:54 GMT
From: bart.mediamind@tornado.be (Bart Lateur)
Subject: Re: HELP! Bitwise XOR (^) doesn't work on strings?
Message-Id: <34a17239.839034@news.tornado.be>
Randal Schwartz <merlyn@stonehenge.com> wrote:
>The number 0 and the string "0" are equivalent.
Either you're lying (to use Tom's words), or I'm right. If "0" and 0 are
indistinguishable, there is no way that { 0 ^ 1 } and { "0" ^ "1" } may
give different results.
Let me sprinkle in some SE terms. For the scalar, there is the
INTERFACE, the Perl programmer's viewpoint, where a number and a string
are indistinguishable, and the IMPLEMENTATION, that does make the
distinction, but only for efficiency reasons.
So, if any function does distinguish strings and numbers, it is
bypassing the interface, poking directly into the implementation.
Therefore this is inexcusable.
HTH,
Bart.
------------------------------
Date: Tue, 23 Dec 1997 08:56:51 GMT
From: bart.mediamind@tornado.be (Bart Lateur)
Subject: Re: HELP! Bitwise XOR (^) doesn't work on strings?
Message-Id: <349f71a0.685793@news.tornado.be>
? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au>
wrote:
>>Rules should be simple, and apply to everything there's supposed to
>>apply to.
>
>The name of the above idear is 'orthginality' and its one of the things
>that perl dosn't have alot of.
I know. That's why I used the phrase "they're supposed to apply to".
(sorry for that major spelling error).
Bart.
------------------------------
Date: Mon, 22 Dec 1997 23:47:49 -0500
From: snailgem@aol.com
Subject: how to suppress a warning
Message-Id: <349F426D.68FC@aol.com>
I have the following code:
#!/usr/local/bin/perl -w
use diagnostics;
require "/usr/home/lib/mylib.pl";
@list2sort = ( "the","antichrist", "lives",234,"Wotan", 14, 26,"num666",
"_uncgi",3,97);
@sorted_list = sort better_sort (@list2sort);
print "@sorted_list\n";
The script works fine (better_sort is a sort that handles both numbers
and strings), but before the output I get:
"Identifier "main::better_sort" used only once: possible typo at
./sort.test
line 7 (#1)
(W) Typographical errors often show up as unique identifiers. If
you
had a good reason for having a unique identifier, then just mention
it
again somehow to suppress the message."
Can anybody tell me what I have to do to get rid of this message? How do
I mention a subroutine again to suppress the message?
Thank you.
--
Will
------------------------------
Date: Tue, 23 Dec 1997 00:41:38 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: how to suppress a warning
Message-Id: <comdog-ya02408000R2312970041380001@news.panix.com>
Keywords: from just another new york perl hacker
In article <349F426D.68FC@aol.com>, snailgem@aol.com wrote:
>#!/usr/local/bin/perl -w
>use diagnostics;
>require "/usr/home/lib/mylib.pl";
>@sorted_list = sort better_sort (@list2sort);
>"Identifier "main::better_sort" used only once: possible typo at
>./sort.test
>Can anybody tell me what I have to do to get rid of this message?
i assume that better_sort is in the require()-ed file?
in this case, i prefer to pre-declare my subroutines with
use subs qw(better_sort);
and so on. this is much better than turning warnings off :)
--
brian d foy <comdog@computerdog.com>
Meta Meta FAQ <URL:http://computerdog.com/Meta_MetaFAQ.html>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: Mon, 22 Dec 1997 16:53:56 -0600
From: Ed Kennen <blue-sin-sation@usa.net>
Subject: Re: LWP for Windows
Message-Id: <349EEF84.81473386@usa.net>
Yuksel Aslandogan wrote:
> Hi Everyone,
>
> Is the LWP module available for Win95 or NT?
> I checked CPAN win32 folder and ActiveState's site but was unable to
> find it. I would appreciate any pointers.
>
> Thanks
>
> Y. Alp Aslandogan
> DBIS Lab, UIC.
Howdy! (Just trying to contribute......),
Earlier this year I found "lwpWin32-22feb97_tar.gz" and installed it on
my NT system.
It worked fine. Maybe it has been updated, maybe it is no longer
needed. It was
needed for "Pw32i307.exe" when I used it. (313 is out now, but I have
not upgraded...
you know, if it works, don't fix it.... at least not just before
Christmas ;-)
HTH,
Ed
FYI, Here is the readme form the archive:
# Perl5 Libwww-perlWin32 Martin.Cleaver@BCS.org.uk Release 2.1
22/Feb/1997
#
# This script may be distributed under the same
# terms and conditions as Perl itself.
#
# Libwww-perl (LWP) is a library of Perl modules that facilitate
# easy programming of the WWW. LWP can be found at:
# http://www.perl.com/cgi-bin/cpan_mod?module=LWP
# or: http://www.sn.no/libwww-perl/
#
# lwpWin32 is a Quick'n'Dirty Script to patch libwww-perl-5 to less
# up-to-date platforms.
# I see this being useful in two scenarios:
# 1) to use LWP in a Win32 environment
# 2) to use LWP where Perl 5.003 is not available
# (this use is untested)
#
# lwpWin32 has been tested with LWP 5.05 and appears to work fine under
# 5.07.
#
# INSTRUCTIONS AT THE TOP OF THE SCRIPT!
------------------------------
Date: Tue, 23 Dec 1997 09:18:41 +0100
From: "Irsan Widarto" <irsan@tcf.nl>
Subject: Re: Newbie Help: Removing or ReDimensioning an Array
Message-Id: <67ns73$r5g$1@news2.xs4all.nl>
Howard Hull wrote in message ...
>Is there an easy way to completely destroy or at least remove all
>elements of an array. I've tried a couple of things but haven't gotten
>anything to work correctly.
undef @your_favourite_array
>Any help would be great.
>Thanks.
no worries,
Irsan
--
#-- irsan@tcf.nl
#-- The Connection Factory b.v.
#-- http://www.tcf.nl
------------------------------
Date: 23 Dec 1997 09:53:40 +0100
From: Marek.Rouchal@-nospam-hl.siemens.de (Marek Rouchal)
Subject: Re: next == continue??
Message-Id: <67nu6k$s60@buffalo.HL.Siemens.DE>
In article <349EE03C.418234F5@mystech.com>, "Mark S. Reibert" <reibert@mystech.com> writes:
> Steve Evans wrote:
>
> > I have a good background in C and ksh, and am
> > just starting to learn perl. I like that it
> > looks so much like C, but find it annoying that
> > some key words are different. Does anyone know
> > why "break" in C is "last" in perl, and likewise
> > "continue" is "next"?? Was there some actual reason,
> > or is this just an arbitrary thing?
I guess it's as simple as "C is C and Perl is Perl"
> > And another thing,
> > all the books mention "there is no switch statement,
> > but you can easily write one with if-else". Why!?
> > It's a useful construct, what's the problem adding it??
> > You could probably replace many keywords (while, unless, etc)
> > with if-else's and goto's, but who'd want to?
>
> Be careful - a language built as an extension of C already exists, it's
> called C++. I do, however, agree that a "switch-like" construct would be
> nice.
What is the problem with
while (defined($_ = shift(@ARGV))) {
if(/^-h/) {
&help;
}
elsif(/^-v/) {
&version;
}
elsif ...
}
else {
die "unknown option";
}
}
Note: Yes, I know Getopt::*, this is just an example.
Such a construct is far more flexible than a "switch". You may place
any kind of conditional in if() and as most of Perl's operators
work on $_ if the argument is omitted (such as regular expressions),
these if-elsif-else constructs are kept short and readable.
Please, I do not want to start any flamewars about programming style;
I just want to illustrate how you can handle this topic in perl. Of
course, you'll need to forget about C for a moment...
Hope this helps!
Marek
PS. You even could do (if your subs
return success)
while (defined($_ = shift(@ARGV))) {
/^-h/ && &help && next;
/^-v/ && &version && next;
...
}
Short enough? ;-)
PS. If you want to reply by Email, please remove -nospam- from
the address. Thank you.
--
Marek Rouchal Phone : +49 89/636-25849
SIEMENS AG, HL CAD SYS Fax : +49 89/636-23650
Balanstr. 73 mailto:Marek.Rouchal@-nospam-hl.siemens.de
81541 Muenchen PCmail:Marek.Rouchal.PC@-nospam-hl.siemens.de
------------------------------
Date: 23 Dec 97 09:56:21 GMT
From: nospam@minivend.com
Subject: Re: next == continue??
Message-Id: <349f8ac5.0@news.one.net>
Marek Rouchal <Marek.Rouchal@-nospam-hl.siemens.de> wrote:
> In article <349EE03C.418234F5@mystech.com>, "Mark S. Reibert" <reibert@mystech.com> writes:
>> Steve Evans wrote:
>>
>> > I have a good background in C and ksh, and am
>> > just starting to learn perl. I like that it
>> > looks so much like C, but find it annoying that
>> > some key words are different. Does anyone know
>> > why "break" in C is "last" in perl, and likewise
>> > "continue" is "next"?? Was there some actual reason,
>> > or is this just an arbitrary thing?
> I guess it's as simple as "C is C and Perl is Perl"
And that one is esoteric and one is not. Larry felt free to borrow when
the thing to borrow was good -- but next/redo/last are much more clear
(at least to me) than break/continue.
And since the argument is a label and not an integer it would have been
a real headache to C and sh programmers to do otherwise. Even when I
did a lot of those it was a pain to count levels of break.
Regards,
Mike Heins http://www.minivend.com/ ___
Internet Robotics |_ _|____
"The U.S. Senate -- white 131 Willow Lane, Floor 2 | || _ \
male millionaires working Oxford, OH 45056 | || |_) |
for YOU!" -- Dave Barry <mikeh@minivend.com> |___| _ <
513.523.7621 FAX 7501 |_| \_\
------------------------------
Date: 22 Dec 1997 22:14:55 -0500
From: wescott@cygnus.ColumbiaSC.NCR.COM (Mike Wescott)
Subject: Re: Perl 5.004_04 on MP-RAS problems.
Message-Id: <x41zz4lphs.fsf@cygnus.ColumbiaSC.NCR.COM>
In article <slrn69tnan.3nl.laughman@soccer.cis.ohio-state.edu> laughman@wutang.acs.ohio-state.edu (jason m. laughman) writes:
> I just built perl5.004_04 on NCR's MP-RAS 03.01, and it compiled fine, but
> when I run "make test", it bombs ...
This is due to Configure's having decided that libc doesn't have select()
because it looked at the wrong one.
The simplest solution is to pick up the perl5.004_04.pkg.gz from ncrinfo.ncr.com
and install that. Or, if you really want to build it yourself get the source
from the same place and at least use the config.sh file to start with. The
supplied source includes one fix to enable the DB_File extension.
--
Mike Wescott, NCR Corp
mike.wescott@columbiasc.ncr.com
--
-Mike Wescott
mike.wescott@ColumbiaSC.NCR.COM
------------------------------
Date: 22 Dec 1997 21:58:08 -0800
From: Michael Kelly - FVC PCD VET ~ <kelly@pcocd2.intel.com>
Subject: perl <STDOUT> to gnuplot <STDIN>
Message-Id: <us2iusg7g9b.fsf@fsp140.fm.intel.com>
I need help with a perl script that sorts data into arrays,
then plots selected array slices with gnuplot. I have a script
writing slices to files and ploting the files but this is quite a disk
hog. I did consider writing to /tmp and removing the files after
ploting but considered this could get messy if the script dies. My
version of gnuplot is '3.5'.
From the gnuplot console I can enter data with
plot '< cat
data data
data data
data data
^d
From perl I can call gnuplot with
open PLOT,"|gnuplot";
print PLOT "set title \"$title\"\n";
print PLOT "set autoscale\n";
print PLOT "set xrange \[$xmin\:$xmax\]\n";
print PLOT "set yrange \[$ymin\:$ymax\]\n";
print PLOT "plot \'$data\' using 1\:2 with points\n";
print PLOT "pause 9\n";
close PLOT;
What I really want to do is something like
open PLOT,"|gnuplot";
(setup stuff)
foreach (yatta yatta yatta)
{
print PLOT "plot $xdata $ydata\n";
} # end of foreach yatta
print PLOT "using 1\:2 with points\n";
close PLOT;
--
=====================================================================
Michael Kelly - Peripheral Components Division - Validation Center
Office: (916) 356-2822 Mail stop: FM3-114
pager (916) 328-6895 Location: FM3/2/E2
E-Mail: kelly@pcocd2.intel.com
I don't speak for Intel
JUST SAY NO (to a pretty gui)
=====================================================================
------------------------------
Date: Mon, 22 Dec 1997 22:27:17 -0700
From: mbudash@sonic.net (Michael Budash)
Subject: Re: pgp encrypion via perl script
Message-Id: <mbudash-2212972227180001@d215.pm13.sonic.net>
Thanks to all of you who replied in this matter. I'm now using Open2 and
not the backtick method I was originally using.
To be more direct: We can drop this thread now - I think everyone is
probably tired of seeing it...
Thanks again!
Michael
--
Michael Budash, Owner * Michael Budash Consulting
mbudash@sonic.net * http://www.sonic.net/~mbudash
707-255-5371 * 707-258-7800 x7736
------------------------------
Date: 23 Dec 1997 04:32:04 GMT
From: Eli the Bearded <#@qz.to>
Subject: Re: Q: what does __ do ?
Message-Id: <eli$9712222308@qz.little-neck.ny.us>
Songtao Chen <songtao@nortel.ca> wrote:
> Simple question. What does __ do ?
Nothing. Anything.
> It appears in a signal trap,
You saw it there but it could be anywhere.
> sub signal_trap
> {
> local($sig) = shift;
> __;
> print "caught signal $sig\n";
> exit "$sig";
> }
:r! perl5.00404 -we '__'
Useless use of a constant in void context at -e line 1.
:r! perl5.00404 -we '$__=__; print "$__\n"'
__
:r! perl5.00404 -we '$NY_PM = 123_456__789; print $NY_PM,"\n";'
Misplaced _ in number at -e line 1.
123456789
:r! perl5.00404 -we 'sub __ { q:MP.YN: };$_=reverse __;print "$_\n"'
NY.PM
See? __ can be nothing, itself, a warning, or anything.
Elijah
------
#!/usr/bin/perl -- -*- my ny.pm sig -*-
$_=$^ ;s;s;sss;;s^.^ju^&&s&P&,\n&&&(s(_..)(ers)||s|^|^^|)&&s(T)(q(st%eg))eg;
s<.(o).><$& new 1$$>i+s+\dst.+$a--||reverse(q(rep k))+ge;s*%.+u* so+*i;s=\++
="me"=mex&&s%ege%l$"hke%;$a||s/^\S+ /\/\//;s;\d+;yor;;s[KE]<ac$&>i;print $_;
------------------------------
Date: 23 Dec 1997 12:10:40 GMT
From: "robban" <robnet@hem1.passagen.se>
Subject: Shortcut
Message-Id: <01bd0f9b$a3eb5b60$c82da8c0@akilles.ittek.org>
Does anyone know the format of a .lnk file (shortcut) in windows 95/NT4?
Or have a utility that creates one for use with scripting utilities
(preferably perl)? Is there a perl module?
tia,
robban
robnet(a)hem1.passagen.se
------------------------------
Date: 23 Dec 97 12:35:51 GMT
From: nospam@minivend.com
Subject: Re: Shortcut
Message-Id: <349fb027.0@news.one.net>
In comp.lang.perl.misc robban <robnet@hem1.passagen.se> wrote:
> Does anyone know the format of a .lnk file (shortcut) in windows 95/NT4?
> Or have a utility that creates one for use with scripting utilities
> (preferably perl)? Is there a perl module?
use Win32::Shortcut;
my $short = new Win32::Shortcut;
$short->{Path} = "c:/mybin/myprog.exe";
$short->{WorkingDirectory} = "c:/mydir";
$short->{File} = "Start my program";
$short->Save();
Regards,
Mike Heins http://www.minivend.com/ ___
Internet Robotics |_ _|____
"The U.S. Senate -- white 131 Willow Lane, Floor 2 | || _ \
male millionaires working Oxford, OH 45056 | || |_) |
for YOU!" -- Dave Barry <mikeh@minivend.com> |___| _ <
513.523.7621 FAX 7501 |_| \_\
------------------------------
Date: 23 Dec 1997 10:37:05 GMT
From: "Roger Caffin" <rXXX.caffin@tpgi.com.au>
Subject: Re: Which language pays most 17457 -- C++ vs. Java?
Message-Id: <01bd0f8e$c3dc2880$b9a00ccb@berrico>
David Grove <dgrove@ntslink.net> wrote in article
<349d7218.98517020@news.ntslink.net>...
> I should point out that these languages pay more because it's hard to
,-------------------------------------------------------------^^^
| > find people who would stoop so low as to work with them. :)
| > >Craig A. Johnston wrote:
| > >> COBOL. COBOL pays the most. Get to it, son.
| > >This is not strictly true - MUMPS pays even more than COBOL.
| > >However, there are more COBOL positions available (but it makes
| > >no difference, since you'll never find an unemployed MUMPS or COBOL
| > >programmer).
|
\ ---Which was the original question in this somewhat noisy, now
non-Fortran-related thread.
Cheers for Xmas all.
Roger
--
Roger Caffin (Dr)
Director
Berrilee Consulting Services P/L
5 Charltons Ck Rd
Berrilee NSW 2159
Australia
All the usual disclaimers apply....
Remove obvious antispam Xs from signature
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.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 1527
**************************************