[27869] in Perl-Users-Digest
Perl-Users Digest, Issue: 9233 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 18 09:05:44 2006
Date: Thu, 18 May 2006 06:05:06 -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 Thu, 18 May 2006 Volume: 10 Number: 9233
Today's topics:
"my" and "our" <bol@adv.magwien.gv.at>
Re: ActivePerl error message? Router script. Please hel wrreisen2@yahoo.com
Re: ActivePerl error message? Router script. Please hel <ku.ca.kroy@105trn.ignore.this.bit>
Re: ActivePerl error message? Router script. Please hel <ku.ca.kroy@105trn.ignore.this.bit>
Re: ActivePerl error message? Router script. Please hel wrreisen2@yahoo.com
AT Command through Perl <chellappa.ns@gmail.com>
Re: AT Command through Perl <daveandniki@ntlworld.com>
Re: chdir ($variable) <bol@adv.magwien.gv.at>
Re: how to run applications in windows using perl scrip <thiagu.m@gmail.com>
Re: How to use CryptFindOIDInfo with Win32::API ? <ThomasKratz@REMOVEwebCAPS.de>
new CPAN modules on Thu May 18 2006 (Randal Schwartz)
Re: Tabs versus Spaces in Source Code <pjb@informatimago.com>
Re: Untraceable warning: "Warning: Use of "require" wit <julian@mehnle.net>
Re: Untraceable warning: "Warning: Use of "require" wit <julian@mehnle.net>
Re: variable that I want to treat as information read f <bol@adv.magwien.gv.at>
Re: variable that I want to treat as information read f <bol@adv.magwien.gv.at>
Re: variable that I want to treat as information read f <mritty@gmail.com>
Re: variable that I want to treat as information read f <David.Squire@no.spam.from.here.au>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 18 May 2006 12:46:44 +0200
From: "Ferry Bolhar" <bol@adv.magwien.gv.at>
Subject: "my" and "our"
Message-Id: <1147949205.299835@proxy.dienste.wien.at>
Hi,
while testing a program, I erroneously declared the same variable twice
within a block, the first time with "my", the second time with "our":
{
my $fz = 'VTX_Link';
... ( around 200 lines of code, all in the same block)
our $fz = 'VTX_Linkset';
...
}
So the initial contents of the $fz declared with "my" is lost, because
"our" creates a lexical alias for the global $fz, thus overwriting the
previous "my" declaration.
It was my error, no question. But I wonder why Perl doesn't mention
this - even with "use strict" and "use warnings" set. Unlike as in the
reverse case - declaring the variable first with "our" and then with "my"
results in the message
"my" variable $fz masks earlier declaration in same scope at ...
And declaring the variable twice with "our" shows a similar message
("our" variable $fz masks earlier declaration...). Only in the above case,
nothing is shown.
Is this expected behaviour (I tried 5.6.1, 5.8.6 and 5.8.7)?
Kind greetings,
Ferry
--
Ing. Ferry Bolhar
Municipality of Vienna, Department 14
A-1010 Vienna / AUSTRIA
E-mail: bol@adv.magwien.gv.at
------------------------------
Date: 18 May 2006 03:22:00 -0700
From: wrreisen2@yahoo.com
Subject: Re: ActivePerl error message? Router script. Please help.Newbie
Message-Id: <1147947720.589972.33960@i40g2000cwc.googlegroups.com>
Hi,
Thanks for all your help. I installed
> Telnet.pm
> Mailer.pm
> Syslog.pm
> template.pm manually because I couldn't work out how to get ppm to do anything. Now I've got it ppm working.
So now I've:
1:) uninstalled ActivePerl
2:) Restarted WinXP Pro
3:) deleted c:\Perl to remove any of my previous manually installed .pm
files.
4:) Reinstalled ActivePerl
5:) Tried running the Perl script mentioned in the first post in this
thread.
6:) Of course got the same error message as 1st mentioned:
C:/Perl/site/lib .) at c:\inetpub\wwwroot\perl\router.pl line 5.
BEGIN failed--compilation aborted at c:\inetpub\wwwroot\perl\router.pl
line 5.
7:) Did C:> ppm install Net-Telnet
8:) Ran Perl Script as mentioned in the first post.
9:) Get error:
Can't locate Sys/Syslog.pm in @INC (@INC contains: C:/Perl/lib
C:/Perl/site/lib .) at c:\inetpub\wwwroot\perl\router.pl line 7.
BEGIN failed--compilation aborted at c:\inetpub\wwwroot\perl\router.pl
line 7.
10:) Did c:>ppm search sys-syslog
Searching in Active Repositories
No matches for 'sys-syslog'; see 'help search'.
Does this mean as Charles DeRykus says that there is no Win32 port of
Sys-syslog?
Is there anyway of getting this script to work in windows?
When I run:
#!/usr/bin/perl
use warnings;
use strict;
use Sys::Syslog;
openlog("","","user");
__END__
I get the same error message:
Can't locate Sys/Syslog.pm in @INC (@INC contains: C:/Perl/lib
C:/Perl/site/lib .) at c:\inetpub\wwwroot\perl\olivertest2.pl line 4.
BEGIN failed--compilation aborted at
c:\inetpub\wwwroot\perl\olivertest2.pl line 4.
>What does line 42 say?
if ( $p->ping($ip) )
Thanks. Are there any similar scripts out there that may do the same
thing that would work in Windows. Thanks.
------------------------------
Date: Thu, 18 May 2006 11:53:37 +0100
From: Nick <ku.ca.kroy@105trn.ignore.this.bit>
Subject: Re: ActivePerl error message? Router script. Please help.Newbie
Message-Id: <e4hjnh$jhd$1@pump1.york.ac.uk>
wrreisen2@yahoo.com wrote:
> Hi,
>
> Thanks for all your help. I installed
>
>>Telnet.pm
>>Mailer.pm
>>Syslog.pm
>>template.pm manually because I couldn't work out how to get ppm to do anything. Now I've got it ppm working.
>
> So now I've:
> 1:) uninstalled ActivePerl
> 2:) Restarted WinXP Pro
> 3:) deleted c:\Perl to remove any of my previous manually installed .pm
> files.
> 4:) Reinstalled ActivePerl
> 5:) Tried running the Perl script mentioned in the first post in this
> thread.
> 6:) Of course got the same error message as 1st mentioned:
> C:/Perl/site/lib .) at c:\inetpub\wwwroot\perl\router.pl line 5.
> BEGIN failed--compilation aborted at c:\inetpub\wwwroot\perl\router.pl
> line 5.
> 7:) Did C:> ppm install Net-Telnet
> 8:) Ran Perl Script as mentioned in the first post.
> 9:) Get error:
> Can't locate Sys/Syslog.pm in @INC (@INC contains: C:/Perl/lib
> C:/Perl/site/lib .) at c:\inetpub\wwwroot\perl\router.pl line 7.
> BEGIN failed--compilation aborted at c:\inetpub\wwwroot\perl\router.pl
> line 7.
> 10:) Did c:>ppm search sys-syslog
> Searching in Active Repositories
> No matches for 'sys-syslog'; see 'help search'.
>
> Does this mean as Charles DeRykus says that there is no Win32 port of
> Sys-syslog?
>
> Is there anyway of getting this script to work in windows?
>
> When I run:
> #!/usr/bin/perl
> use warnings;
> use strict;
> use Sys::Syslog;
> openlog("","","user");
> __END__
> I get the same error message:
>
> Can't locate Sys/Syslog.pm in @INC (@INC contains: C:/Perl/lib
> C:/Perl/site/lib .) at c:\inetpub\wwwroot\perl\olivertest2.pl line 4.
> BEGIN failed--compilation aborted at
> c:\inetpub\wwwroot\perl\olivertest2.pl line 4.
>
>
>>What does line 42 say?
>
> if ( $p->ping($ip) )
>
> Thanks. Are there any similar scripts out there that may do the same
> thing that would work in Windows. Thanks.
>
If you don't really need the logging capabilities, you could always just
comment out line 32...?
xF,
...Nick
------------------------------
Date: Thu, 18 May 2006 11:54:06 +0100
From: Nick <ku.ca.kroy@105trn.ignore.this.bit>
Subject: Re: ActivePerl error message? Router script. Please help.Newbie
Message-Id: <e4hjof$jhd$2@pump1.york.ac.uk>
[...]line 32...[...]
By which, of course, I meant "38"!
------------------------------
Date: 18 May 2006 04:28:05 -0700
From: wrreisen2@yahoo.com
Subject: Re: ActivePerl error message? Router script. Please help.Newbie
Message-Id: <1147951685.043987.134390@j73g2000cwa.googlegroups.com>
Thanks Nick
Have commented out line 7
# use Sys::Syslog;
and line 38
When I run the script it now gives:
Can't locate Mail/Mailer.pm in @INC (@INC contains: C:/Perl/lib
C:/Perl/site/lib .) at c:\inetpub\wwwroot\perl\router.pl line 8.
BEGIN failed--compilation aborted at c:\inetpub\wwwroot\perl\router.pl
line 8.
I did c:>ppm search mail-mailer
There isn't one. I presume that this means that mail-mailer isn't
available for Win32?
I would guess it wouldn't work if I commented out the lines to do with
this Mail-mailer module?
$mailer = Mail::Mailer->new("smtp", Server => "localhost") || die
"can't new mail";
$mailer->open({ From => 'root',
To => 'root',
Subject=> "router reboot",
}) or die "can't open mail";
print $mailer "router reboot";
$mailer->close() || die "can't close mail";
}
Is there some other way? Thanks again.
------------------------------
Date: 18 May 2006 03:49:53 -0700
From: "chellappa" <chellappa.ns@gmail.com>
Subject: AT Command through Perl
Message-Id: <1147949393.487231.171750@i40g2000cwc.googlegroups.com>
Dear all,
I want to run modem AT Commands through PERL .If anybody have idea
about it , please give nice idea about it.
by
chellappa
------------------------------
Date: Thu, 18 May 2006 13:07:19 +0200
From: "Dave" <daveandniki@ntlworld.com>
Subject: Re: AT Command through Perl
Message-Id: <446c556b$0$18335$8fcfb975@news.wanadoo.fr>
"chellappa" <chellappa.ns@gmail.com> wrote in message
news:1147949393.487231.171750@i40g2000cwc.googlegroups.com...
> Dear all,
>
> I want to run modem AT Commands through PERL .If anybody have idea
> about it , please give nice idea about it.
>
> by
> chellappa
>
Look at the Device::Modem module on cpan.
------------------------------
Date: Thu, 18 May 2006 12:28:36 +0200
From: "Ferry Bolhar" <bol@adv.magwien.gv.at>
Subject: Re: chdir ($variable)
Message-Id: <1147948117.806514@proxy.dienste.wien.at>
Paul Lalli:
>>> chdir("$folder") or die "can't change dir $folder" ;
>>
>> Quotes not required in chdir.
>
> That is a misstatement of the truth. Quotes are dependent on what
> they're quoting, not where they're being used.
You're right. I should have written this as "in _this_ chdir".
BTW: the parentheses aren't required as well here, but
using them or not is rather a question of style...
> Quotes of some kind are always required around a string that
> consists of non-word characters.
Almost always. Not in regular expressions.
Greetings, Ferry
--
Ing. Ferry Bolhar
Municipality of Vienna, Department 14
A-1010 Vienna / AUSTRIA
E-mail: bol@adv.magwien.gv.at
------------------------------
Date: 18 May 2006 05:53:14 -0700
From: "Thiagu.M" <thiagu.m@gmail.com>
Subject: Re: how to run applications in windows using perl scripting
Message-Id: <1147956794.337636.137920@j33g2000cwa.googlegroups.com>
"hara" <hara.acha...@gmail.com> wrote in news:1147328321.964889.131790
@q12g2000cwa.googlegroups.com:
> I want to copy the builds from a certain path in the server to my
> local machine. I.e backup type of thing.
Hi hara
u can use robocopy.exe,a tool provided in the windows 2003
resource kit for taking backup of updated files.it will work also in
windows 2000.(It will not be in windows2000 resource kit,just copy
from windows2003 OS).
Thanks,
Thiagu.M
Kambainallur
------------------------------
Date: Thu, 18 May 2006 12:46:59 +0200
From: Thomas Kratz <ThomasKratz@REMOVEwebCAPS.de>
Subject: Re: How to use CryptFindOIDInfo with Win32::API ?
Message-Id: <446c50a3$0$31169$bb690d87@news.main-rheiner.de>
Daria Morgendorffer wrote:
>
>
> Hi, I am VERY sorry for disturbing , but believe me that I've already
> spent way too much time with thinking and googling before I dared turn
> to you...
>
>
> In my Perl script I want to use the CryptFindOIDInfo function documented
> at
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/seccrypto/security/cryptfindoidinfo.asp
>
> . So I typed the code...
>
> use Win32::API;
>
> # Note: for the sake of clarity a union that is part of CRYPT_OID_INFO
> # was replaced with a single variable.
> Win32::API::Struct->typedef( 'CRYPT_OID_INFO', qw(
> DWORD cbSize;
> char *pszOID;
> char *pwszName;
> DWORD dwGroupId;
> DWORD dwValue;
> DWORD cData;
> BYTE *pbData;
> ));
>
> Win32::API::Type->typedef( 'PCCRYPT_OID_INFO', '*CRYPT_OID_INFO' );
>
> Win32::API->Import('crypt32',
> 'PCCRYPT_OID_INFO WINAPI CryptFindOIDInfo(DWORD dwKeyType, void*
> pvKey, DWORD dwGroupId)'
> );
>
>
> This is the whole code, I didn't get any further yet...
>
> The perl interpreter keeps giving me just a cryptic report
>
> Win32::API::parse_prototype: bad prototype 'PCCRYPT_OID_INFO WINAPI
> CryptFindOIDInfo(DWORD dwKeyType, void* pvKey, DWORD dwGroupId)' at
> C:/Perl/site/lib/Win32/API.pm line 278, <DATA> line 164.
>
>
> The code in API.pm is not helping much and I don't have idea how to
> figure out where is the problem. Can you see it?
>
> Thank you in advance!
I don't think this will be easy. HAve a look here
http://tinyurl.com/fz98k
Thomas
--
$/=$,,$_=<DATA>,s,(.*),$1,see;__END__
s,^(.*\043),,mg,@_=map{[split'']}split;{#>J~.>_an~>>e~......>r~
$_=$_[$%][$"];y,<~>^,-++-,?{$/=--$|?'"':#..u.t.^.o.P.r.>ha~.e..
'%',s,(.),\$$/$1=1,,$;=$_}:/\w/?{y,_, ,,#..>s^~ht<._..._..c....
print}:y,.,,||last,,,,,,$_=$;;eval,redo}#.....>.e.r^.>l^..>k^.-
------------------------------
Date: Thu, 18 May 2006 04:42:05 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Thu May 18 2006
Message-Id: <IzG2E5.ywr@zorch.sf-bay.org>
The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN). You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.
Test-Data-1.19
http://search.cpan.org/~bdfoy/Test-Data-1.19/
test functions for particular variable types
----
Test-ISBN-1.07
http://search.cpan.org/~bdfoy/Test-ISBN-1.07/
Check International Standard Book Numbers
----
Test-HTTPStatus-1.05
http://search.cpan.org/~bdfoy/Test-HTTPStatus-1.05/
check an HTTP status
----
Test-File-1.15
http://search.cpan.org/~bdfoy/Test-File-1.15/
test file attributes
----
Test-Env-1.06
http://search.cpan.org/~bdfoy/Test-Env-1.06/
test the environment
----
ExtUtils-ModuleMaker-0.47
http://search.cpan.org/~jkeenan/ExtUtils-ModuleMaker-0.47/
Better than h2xs for creating modules
----
Test-URI-1.05
http://search.cpan.org/~bdfoy/Test-URI-1.05/
Check Uniform Resource Identifiers
----
Tie-Toggle-1.06
http://search.cpan.org/~bdfoy/Tie-Toggle-1.06/
False and true, alternately, ad infinitum.
----
Module-Release-1.07
http://search.cpan.org/~bdfoy/Module-Release-1.07/
Automate software releases
----
Set-CrossProduct-1.8
http://search.cpan.org/~bdfoy/Set-CrossProduct-1.8/
work with the cross product of two or more sets
----
Object-Signature-1.04
http://search.cpan.org/~adamk/Object-Signature-1.04/
Generate cryptographic signatures for objects
----
Tie-Cycle-1.13
http://search.cpan.org/~bdfoy/Tie-Cycle-1.13/
Cycle through a list of values via a scalar.
----
Mac-PropertyList-1.29
http://search.cpan.org/~bdfoy/Mac-PropertyList-1.29/
work with Mac plists at a low level
----
Bio-Phylo-0.08
http://search.cpan.org/~rvosa/Bio-Phylo-0.08/
Phylogenetic analysis using perl.
----
WWW-YouTube-2006.0517
http://search.cpan.org/~ermeyers/WWW-YouTube-2006.0517/
YouTube Developer Interface
----
File-HStore-0.07
http://search.cpan.org/~adulau/File-HStore-0.07/
Perl extension to store files on a filesystem using a very simple hash-based storage.
----
Tk-Wizard-Bases-1.943
http://search.cpan.org/~lgoddard/Tk-Wizard-Bases-1.943/
----
Class-DBI-AutoIncrement-0.03
http://search.cpan.org/~erwan/Class-DBI-AutoIncrement-0.03/
Emulate auto-incrementing columns on Class::DBI subclasses
----
Snort-Rule-1.02
http://search.cpan.org/~saxjazman/Snort-Rule-1.02/
Perl extension for dynamically building snort rules
----
Snort-Rule-1.01
http://search.cpan.org/~saxjazman/Snort-Rule-1.01/
Perl extension for dynamically building snort rules
----
Bigtop-0.11
http://search.cpan.org/~philcrow/Bigtop-0.11/
A web application data language processor
----
Net-SFTP-Foreign-0.90_10
http://search.cpan.org/~salva/Net-SFTP-Foreign-0.90_10/
Secure File Transfer Protocol client
----
Net-SFTP-Foreign-0.61
http://search.cpan.org/~salva/Net-SFTP-Foreign-0.61/
Secure File Transfer Protocol client
----
Serdisp-0.02
http://search.cpan.org/~fuzz/Serdisp-0.02/
Perl extension for talking to the serdisplib
----
Algorithm-RandomMatrixGeneration-0.04
http://search.cpan.org/~anaghakk/Algorithm-RandomMatrixGeneration-0.04/
Perl module to generate matrix given the marginals.
----
Bundle-Modules-2006.0517
http://search.cpan.org/~ermeyers/Bundle-Modules-2006.0517/
All current *stable* bundles of modules in CPAN
----
Bio-SCF-1.01
http://search.cpan.org/~lds/Bio-SCF-1.01/
Perl extension for reading and writting SCF sequence files
----
IMDB-Film-0.21
http://search.cpan.org/~stepanov/IMDB-Film-0.21/
OO Perl interface to the movies database IMDB.
----
Catalyst-Plugin-RequestToken-0.04
http://search.cpan.org/~hide/Catalyst-Plugin-RequestToken-0.04/
Handling transaction token for Catalyst
----
HTML-TreeBuilder-XPath-0.05
http://search.cpan.org/~mirod/HTML-TreeBuilder-XPath-0.05/
add XPath support to HTML::TreeBuilder
----
Apache-Htpasswd-1.8
http://search.cpan.org/~kmeltz/Apache-Htpasswd-1.8/
Manage Unix crypt-style password file.
----
CGI-Minimal-1.25
http://search.cpan.org/~snowhare/CGI-Minimal-1.25/
A lightweight CGI form processing package
----
IO-Compress-Zlib-2.000_12
http://search.cpan.org/~pmqs/IO-Compress-Zlib-2.000_12/
----
IO-Compress-Lzop-2.000_12
http://search.cpan.org/~pmqs/IO-Compress-Lzop-2.000_12/
Write lzop files/buffers
----
IO-Compress-Bzip2-2.000_12
http://search.cpan.org/~pmqs/IO-Compress-Bzip2-2.000_12/
Write bzip2 files/buffers
----
IO-Compress-Base-2.000_12
http://search.cpan.org/~pmqs/IO-Compress-Base-2.000_12/
Base Class for IO::Compress modules
----
Compress-Zlib-2.000_12
http://search.cpan.org/~pmqs/Compress-Zlib-2.000_12/
Interface to zlib compression library
----
Compress-Raw-Zlib-2.000_12
http://search.cpan.org/~pmqs/Compress-Raw-Zlib-2.000_12/
Low-Level Interface to zlib compression library
----
Compress-Raw-Bzip2-2.000_12
http://search.cpan.org/~pmqs/Compress-Raw-Bzip2-2.000_12/
Low-Level Interface to bzip2 compression library
----
Business-iDEAL-Mollie-0.01
http://search.cpan.org/~blom/Business-iDEAL-Mollie-0.01/
Backend for iDEAL payments through mollie.nl
----
Sort-Key-1.25
http://search.cpan.org/~salva/Sort-Key-1.25/
the fastest way to sort anything in Perl
----
Catalyst-View-GD-Barcode-QRcode-0.03
http://search.cpan.org/~hide/Catalyst-View-GD-Barcode-QRcode-0.03/
GD::Barcode::QRcode View Class
----
Plagger-0.7.0
http://search.cpan.org/~miyagawa/Plagger-0.7.0/
Pluggable RSS/Atom Aggregator
----
Catalyst-View-GD-Barcode-QRcode-0.02
http://search.cpan.org/~hide/Catalyst-View-GD-Barcode-QRcode-0.02/
GD::Barcode::QRcode View Class
----
Net-Scan-SMTP-Banner-0.01
http://search.cpan.org/~mcantoni/Net-Scan-SMTP-Banner-0.01/
scan for banner message from a SMTP server
----
Data-ID-Exim-0.002
http://search.cpan.org/~zefram/Data-ID-Exim-0.002/
generate Exim message IDs
----
Xango-1.08_01
http://search.cpan.org/~dmaki/Xango-1.08_01/
Event Based High Performance Web Crawler Framework
----
Data-Average-0.02
http://search.cpan.org/~dmaki/Data-Average-0.02/
Hold Data Set To Calculate Average
----
Catalyst-View-GD-Barcode-QRcode-0.01
http://search.cpan.org/~hide/Catalyst-View-GD-Barcode-QRcode-0.01/
GD::Barcode::QRcode View Class
----
Palm-Zetetic-Strip-1.02
http://search.cpan.org/~ddribin/Palm-Zetetic-Strip-1.02/
Manipulate Zetetic Strip Palm database files
----
Net-eBay-0.31
http://search.cpan.org/~ichudov/Net-eBay-0.31/
Perl Interface to XML based eBay API.
If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.
print "Just another Perl hacker," # the original
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: Thu, 18 May 2006 13:10:13 +0200
From: Pascal Bourguignon <pjb@informatimago.com>
Subject: Re: Tabs versus Spaces in Source Code
Message-Id: <87ves3wpuy.fsf@thalassa.informatimago.com>
Edmond Dantes <edmond@le-comte-de-monte-cristo.biz> writes:
> It all depends on your editor of choice. Emacs editing of Lisp (and a few
> other languages, such as Python) makes the issue more or less moot. I
> personally would recommend choosing one editor to use with all your
> projects, and Emacs is wonderful in that it has been ported to just about
> every platform imaginable.
>
> The real issue is, of course, that ASCII is showing its age and we should
> probably supplant it with something better. But I know that will never fly,
> given the torrents of code, configuration files, and everything else in
> ASCII. Even Unicode couldn't put a dent in it, despite the obvious growing
> global development efforts. Not sure how many compilers would be able to
> handle Unicode source anyway. I suspect the large majority of them would
> would choke big time.
All right unicode support is not 100% perfect already, but my main
compilers support it perfectly well, only 1/5 don't support it, and
1/5 support it partially:
------(unicode-script.lisp)---------------------------------------------
(defun clisp (file)
(ext:run-program "/usr/local/bin/clisp"
:arguments (list "-ansi" "-norc" "-on-error" "exit"
"-E" "utf-8"
"-i" file "-x" "(ext:quit)")
:input nil :output :terminal :wait t))
(defun gcl (file)
(ext:run-program "/usr/local/bin/gcl"
:arguments (list "-batch"
"-load" file "-eval" "(lisp:quit)")
:input nil :output :terminal :wait t))
(defun ecl (file)
(ext:run-program "/usr/local/bin/ecl"
:arguments (list "-norc"
"-load" file "-eval" "(si:quit)")
:input nil :output :terminal :wait t))
(defun sbcl (file)
(ext:run-program "/usr/local/bin/sbcl"
:arguments (list "--userinit" "/dev/null"
"--load" file "--eval" "(sb-ext:quit)")
:input nil :output :terminal :wait t))
(defun cmucl (file)
(ext:run-program "/usr/local/bin/cmucl"
:arguments (list "-noinit"
"-load" file "-eval" "(extensions:quit)")
:input nil :output :terminal :wait t))
(dolist (implementation '(clisp gcl ecl sbcl cmucl))
(sleep 3)
(terpri) (print implementation) (terpri)
(funcall implementation "unicode-source.lisp"))
------(unicode-source.lisp)---------------------------------------------
;; -*- coding: utf-8 -*-
(eval-when (:compile-toplevel :load-toplevel :execute)
(format t "~2%~A ~A~2%"
(lisp-implementation-type)
(lisp-implementation-version))
(finish-output))
(defun ιοτα (&key (номер 10) (단계 1) (בכוכ 0))
(loop :for i :from בכוכ :to номер :by 단계 :collect i))
(defun test ()
(format t "~%Calling ~S --> ~A~%"
'(ιοτα :номер 10 :단계 2 :בכוכ 2)
(ιοτα :номер 10 :단계 2 :בכוכ 2)))
(test)
------------------------------------------------------------------------
(load"unicode-script.lisp")
;; Loading file unicode-script.lisp ...
CLISP
i i i i i i i ooooo o ooooooo ooooo ooooo
I I I I I I I 8 8 8 8 8 o 8 8
I \ `+' / I 8 8 8 8 8 8
\ `-+-' / 8 8 8 ooooo 8oooo
`-__|__-' 8 8 8 8 8
| 8 o 8 8 o 8 8
------+------ ooooo 8oooooo ooo8ooo ooooo 8
Copyright (c) Bruno Haible, Michael Stoll 1992, 1993
Copyright (c) Bruno Haible, Marcus Daniels 1994-1997
Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998
Copyright (c) Bruno Haible, Sam Steingold 1999-2000
Copyright (c) Sam Steingold, Bruno Haible 2001-2006
;; Loading file unicode-source.lisp ...
CLISP 2.38 (2006-01-24) (built 3347193361) (memory 3347193794)
Calling (ΙΟΤΑ :НОМЕР 10 :단계 2 :בכוכ 2) --> (2 4 6 8 10)
;; Loaded file unicode-source.lisp
Bye.
GCL
GNU Common Lisp (GCL) GCL 2.6.7
Calling (ιοτα :номер 10 :단계 2 :בכוכ 2) --> (2 4 6 8
10)
ECL
;;; Loading "unicode-source.lisp"
ECL 0.9g
Calling (ιοτα :номер 10 :단계 2 :בכוכ 2) --> (2 4 6 8 10)
SBCL
This is SBCL 0.9.12, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
SBCL 0.9.12
Calling (|ιοτα| :|номер| 10 :|ˋ¨ʳÂ| 2 :|בכוכ| 2) --> (2 4 6 8 10)
CMUCL
; Loading #P"/local/users/pjb/src/lisp/encours/unicode-source.lisp".
CMU Common Lisp 19c (19C)
Reader error at 214 on #<Stream for file "/local/users/pjb/src/lisp/encours/unicode-source.lisp">:
Undefined read-macro character #\Ã
[Condition of type READER-ERROR]
Restarts:
0: [CONTINUE] Return NIL from load of "unicode-source.lisp".
1: [ABORT ] Skip remaining initializations.
Debug (type H for help)
(LISP::%READER-ERROR
#<Stream for file "/local/users/pjb/src/lisp/encours/unicode-source.lisp">
"Undefined read-macro character ~S"
#\Ã)
Source: Error finding source:
Error in function DEBUG::GET-FILE-TOP-LEVEL-FORM: Source file no longer exists:
target:code/reader.lisp.
0] abort
*
Received EOF on *standard-input*, switching to *terminal-io*.
* (extensions:quit)
;; Loaded file unicode-script.lisp
T
[4]>
--
__Pascal Bourguignon__ http://www.informatimago.com/
Grace personified,
I leap into the window.
I meant to do that.
------------------------------
Date: Thu, 18 May 2006 12:57:42 +0200
From: Julian Mehnle <julian@mehnle.net>
Subject: Re: Untraceable warning: "Warning: Use of "require" without parentheses is ambiguous at (eval 23) line 1."
Message-Id: <e4hjv4$eb8$1@svr7.m-online.net>
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigBD6A04FEA8130C26B5A471EC
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Brian McCauley wrote:
> Julian Mehnle wrote:
>> Well, "at (eval) line 1" isn't very helpful because there are lots of
>> one-line "eval"s in my project, and "(eval 23)" presumably means the 2=
3rd
>> "eval" encountered, but which one is that?
>=20
> You can change the default "(eval n)" to something more meaning full by=
> changing...
>=20
> eval $cmd;
>=20
> ...to...
>=20
> eval qq(#line 1 "(eval something meaningful)"\n$cmd);
>=20
> Obviously if the eval is visited many times in your code you would what=
> to make "something meaningful" contain something that gives you
> context.
Wow, that sure is a helpful technique!
$ perl -Mdiagnostics=3D-w,-t -e'sub foo {eval "require +5;"} foo'
Warning: Use of "require" without parentheses is ambiguous at (eval 2)
line 1.
at (eval 2) line 1
eval 'require+5;' called at -e line 1
main::foo() called at -e line 1
$ perl -Mdiagnostics=3D-w,-t -e'sub foo {eval qq(#line 1 "my little
eval"\n require +5;)} foo'
Warning: Use of "" without parentheses is ambiguous at my little eval
line 1.
at my little eval line 1
eval 'line 1 "my little eval"
require +5;' called at -e line 1
main::foo() called at -e line 1
I didn't know that feature, but now I found it is documented at the very
bottom of `perldoc perlsyn`. Thanks for the hint!
----
But:
$ perl -Mdiagnostics=3D-w,-t -e'sub foo {eval qq(#line 1 "(my little
eval)"\n require +5;)} foo'
$
Huh? It seems one cannot use parentheses in line directive filenames, or=
Perl suppresses the warnings.
--------------enigBD6A04FEA8130C26B5A471EC
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN xxx SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEbFMowL7PKlBZWjsRAgORAKDBcmvrKw8c5v2b4rqZR6addTdHZgCePCnN
AS+kYLgG7UyTZ4V6b1oSqUQ=
=JJEK
-----END PGP SIGNATURE-----
--------------enigBD6A04FEA8130C26B5A471EC--
------------------------------
Date: Thu, 18 May 2006 13:00:42 +0200
From: Julian Mehnle <julian@mehnle.net>
Subject: Re: Untraceable warning: "Warning: Use of "require" without parentheses is ambiguous at (eval 23) line 1."
Message-Id: <e4hk4m$eb8$2@svr7.m-online.net>
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigC687CB17DACBBB5634BC2C76
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
xhoster@gmail.com wrote:
> Julian Mehnle <julian@mehnle.net> wrote:
>> I tried
>>
>> use Carp qw(verbose);
>> BEGIN { $SIG{__WARN__} =3D sub { Carp::cluck(@_) } }
>>
>> ...but it didn't help. The WARN handler wasn't invoked by the
>> compiler warning.
>=20
> For me it is.
I believe you. I said that I could reproduce it outside my CGI
application, but not inside. I guess it has something to do with the app=
loading CGI::Carp, which probably installs its own WARN handler and throw=
s
the other one away. I'm not sure, though.
--------------enigC687CB17DACBBB5634BC2C76
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN xxx SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEbFPawL7PKlBZWjsRAlk4AJ90XD+VN3lunOz2s8phwUOpvskJ4gCggLLA
w8ZfUe/OLj3jB5NGBOZs1nU=
=BbA4
-----END PGP SIGNATURE-----
--------------enigC687CB17DACBBB5634BC2C76--
------------------------------
Date: Thu, 18 May 2006 14:41:01 +0200
From: "Ferry Bolhar" <bol@adv.magwien.gv.at>
Subject: Re: variable that I want to treat as information read from a txt file, using a while loop
Message-Id: <1147956061.942606@proxy.dienste.wien.at>
David Squire:
>> open(OFile, ">output.txt");
>
> The use of bare-word file handles is discouraged.
Since when?
> Use lexical filehandle (references),
..assuming you're running a version of Perl which supports them.
Greetings, Ferry
--
Ing. Ferry Bolhar
Municipality of Vienna, Department 14
A-1010 Vienna / AUSTRIA
E-mail: bol@adv.magwien.gv.at
------------------------------
Date: Thu, 18 May 2006 14:51:26 +0200
From: "Ferry Bolhar" <bol@adv.magwien.gv.at>
Subject: Re: variable that I want to treat as information read from a txt file, using a while loop
Message-Id: <1147956686.881686@proxy.dienste.wien.at>
> I noticed a mistake in my perl script. It should read:
Which mistake?
You might try this:
$ perl -ne '/<expression>(.*)<\/expression>/ and print "$1\n"' input.txt
>output.txt
HTH & greetings,
Ferry
--
Ing. Ferry Bolhar
Municipality of Vienna, Department 14
A-1010 Vienna / AUSTRIA
E-mail: bol@adv.magwien.gv.at
------------------------------
Date: 18 May 2006 05:54:54 -0700
From: "Paul Lalli" <mritty@gmail.com>
Subject: Re: variable that I want to treat as information read from a txt file, using a while loop
Message-Id: <1147956894.767559.248690@38g2000cwa.googlegroups.com>
Ferry Bolhar wrote:
> David Squire:
>
> >> open(OFile, ">output.txt");
> >
> > The use of bare-word file handles is discouraged.
>
> Since when?
Perl Version 5.6
Paul Lalli
------------------------------
Date: Thu, 18 May 2006 13:55:24 +0100
From: David Squire <David.Squire@no.spam.from.here.au>
Subject: Re: variable that I want to treat as information read from a txt file, using a while loop
Message-Id: <e4hqrs$qpg$1@news.ox.ac.uk>
Ferry Bolhar wrote:
> David Squire:
>
>>> open(OFile, ">output.txt");
>> The use of bare-word file handles is discouraged.
>
> Since when?
Since lexical filehandles have been supported (5.6.0, I think). It gives
you filehandles with limited scope, and lets 'use strict;' help you will
typos.
It might have been clearer to say "discouraged by most posters in this
group".
>
>> Use lexical filehandle (references),
>
> ..assuming you're running a version of Perl which supports them.
Indeed. It's not as if it's that recent a change.
DS
------------------------------
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.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
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 9233
***************************************