[26477] in Perl-Users-Digest
Perl-Users Digest, Issue: 8639 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Nov 7 09:05:21 2005
Date: Mon, 7 Nov 2005 06:05:07 -0800 (PST)
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, 7 Nov 2005 Volume: 10 Number: 8639
Today's topics:
2nd CfP: German Perl Workshop 2006 <schwigon@webit.de>
Cannot get exec syntax correct <usenet739_yahoo_com_au>
Re: Cannot get exec syntax correct <matthew.garrish@sympatico.ca>
hel with win32::ole <jayme@dcc.ufmg.br>
Re: hel with win32::ole <1usa@llenroc.ude.invalid>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 07 Nov 2005 13:53:43 +0100
From: Steffen Schwigon <schwigon@webit.de>
Subject: 2nd CfP: German Perl Workshop 2006
Message-Id: <877jbk8vqg.fsf@teufelkommraus.webit.de>
2. Call for Papers /
8. German Perl-Workshop /
01.03.- 03.03.2006
Location: Ruhr-University in Bochum
The 8th German Perl-Workshop will take place from Wednesday,
01.03.2006 to Friday, 03.03.2006 and you are invited to submit
proposals for talks or tutorials. We will happily accept
proposals for interesting talks related to Perl. Please use
http://www.perl-workshop.de/db/addtalk.epl to enter your proposal.
Extended closing date for proposals is Sunday, 20 Nov 2005.
Thanks,
wsorga@perl-workshop.de
--
Steffen Schwigon <schwigon@webit.de>
------------------------------
Date: Mon, 7 Nov 2005 23:07:25 +1100
From: "Scott Bass" <usenet739_yahoo_com_au>
Subject: Cannot get exec syntax correct
Message-Id: <436f437f$0$14227$5a62ac22@per-qv1-newsreader-01.iinet.net.au>
Active State Perl 5.8
Windoze
I'm trying to write a simple script that will glob all files with a
particular extension, then run a system command against each file. I want
the script to fork off a process for each invocation, and not wait for the
system command to finish.
Here is what I have so far:
#!perl
# set pragmas
use strict;
use warnings;
# define SAS command string(s)
my ($SAS,$args);
# SAS 8
$SAS = q("C:/Program Files/SAS Institute/SAS/V8/sas.exe" -CONFIG "C:/Program
Files/SAS Institute/SAS/V8/SASV8.CFG");
# SAS 9
$SAS = q("C:/Program Files/SAS/SAS 9.1/sas.exe" -CONFIG "C:/Program
Files/SAS/SAS 9.1/nls/en/SASV9.CFG");
# the rest of the options
$args =
q( -rsasuser -icon -nosplash -batch -noterminal -no$syntaxcheck -initstmt
"%include '../init.sas';" -sysin );
# include desired modules
use Getopt::Long;
use File::Basename;
# process command line options
my $debug = '0';
GetOptions ('debug!' => \$debug);
# glob files specified on the command line
my @files;
while (@ARGV) {
push @files, glob(shift @ARGV);
}
# process each file
my ($dirname, $basename);
while (@files) {
$_ = shift @files;
$basename = basename($_);
$dirname = dirname($_);
my @cmd = ( "$SAS $args $basename" );
if (! $debug) {
chdir($dirname);
exec { $cmd[0] } @cmd;
}
else {
print "cd $dirname\n";
print @cmd,"\n";
}
}
exit;
It's failing on line 44 (exec command). I've read the doc
file:///C:/Perl/html/lib/Pod/perlfunc.html, exec command, but am still
having problems.
Thanks,
Scott
------------------------------
Date: Mon, 7 Nov 2005 07:59:43 -0500
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: Cannot get exec syntax correct
Message-Id: <1dIbf.3787$EK.100468@news20.bellglobal.com>
"Scott Bass" <usenet739_yahoo_com_au> wrote in message
news:436f437f$0$14227$5a62ac22@per-qv1-newsreader-01.iinet.net.au...
> Active State Perl 5.8
> Windoze
>
> I'm trying to write a simple script that will glob all files with a
> particular extension, then run a system command against each file. I want
> the script to fork off a process for each invocation, and not wait for the
> system command to finish.
>
> Here is what I have so far:
>
> #!perl
>
> # set pragmas
> use strict;
> use warnings;
>
> # define SAS command string(s)
> my ($SAS,$args);
>
> # SAS 8
> $SAS = q("C:/Program Files/SAS Institute/SAS/V8/sas.exe" -CONFIG
> "C:/Program Files/SAS Institute/SAS/V8/SASV8.CFG");
>
> # SAS 9
> $SAS = q("C:/Program Files/SAS/SAS 9.1/sas.exe" -CONFIG "C:/Program
> Files/SAS/SAS 9.1/nls/en/SASV9.CFG");
>
Is this your real code? If so, why are you immediately overwriting the $SAS
variable?
> # the rest of the options
> $args =
> q( -rsasuser -icon -nosplash -batch -noterminal -no$syntaxcheck -initstmt
> "%include '../init.sas';" -sysin );
>
Uh, $syntaxcheck and %include have not been declared and are not
interpolated when you quote using q//. This may be why your command won't
run...
[snip more code]
> It's failing on line 44 (exec command). I've read the doc
> file:///C:/Perl/html/lib/Pod/perlfunc.html, exec command, but am still
> having problems.
>
Could you please provide a better description of your problem. You're
expectation is that other people have SAS and can test this code, which is
rarely the case unless you're using built-in system commands...
Matt
------------------------------
Date: Mon, 7 Nov 2005 11:07:54 -0200
From: Jayme Assuncao Casimiro <jayme@dcc.ufmg.br>
Subject: hel with win32::ole
Message-Id: <Pine.LNX.4.58.0511071102200.2654@piaba.dcc.ufmg.br>
First)
Im trying to read a xls archive using perl. But it is protected with a=20
password. So,=20
everytime that i try to open the xls archive a box appears to prompt the=20
password. Is there a way to automate this process.
Second)=20
The plan that I'm trying to read is set as Invisible. It is a csv plan.
I have never used win32::ole module before. So, i'm a little bit confused.
Thanks
+---------------------------------------------+
| Jayme Assuncao Casimiro |
| Graduado em Ci=EAncia da Computa=E7=E3o |
| Mestre em Ci=EAncia da Computa=E7=E3o |
| Universidade Federal de Minas Gerais - UFMG |
+---------------------------------------------+
------------------------------
Date: Mon, 07 Nov 2005 13:38:15 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: hel with win32::ole
Message-Id: <Xns970757DEC7BC6asu1cornelledu@127.0.0.1>
Jayme Assuncao Casimiro <jayme@dcc.ufmg.br> wrote in
news:Pine.LNX.4.58.0511071102200.2654@piaba.dcc.ufmg.br:
> First)
> Im trying to read a xls archive using perl. But it is protected with a
> password. So, everytime that i try to open the xls archive a box
> appears to prompt the password. Is there a way to automate this
> process.
Have you read the docs for Win32::OLE? Have you looked at the VBA
documentation? Have you searched the archives for this newsgroup? I
answered several Win32::OLE questions recently, a cursory search should
have found them.
What have you tried so far? Are you asking someone to write code for
you?
To get the most out of your participation in this group, you should read
the posting guidelines, and follow them when posting. A major
recommendation in the guidelines is to post code that others can run.
> Second)
> The plan that I'm trying to read is set as Invisible. It is a csv
> plan.
Are you trying to work with a plain CSV file? If so, how is anything set
to invisible? You can use Text::CSV_XS to work with CSV files.
> I have never used win32::ole
Win32::OLE, case matters.
> So, i'm a little bit confused.
Then, the best way to learn is not to ask others to write your code, but
to follow the documentation to write a simple program to start Excel,
and then open a document.
In Excel, go to Tools -> Macros -> Visual Basic Editor. In the editor,
using the Object Browser (F2), you can look up the methods you can use.
For example:
Function Open(Filename As String, [UpdateLinks], [ReadOnly], [Format],
[Password], [WriteResPassword], [IgnoreReadOnlyRecommended], [Origin],
[Delimiter], [Editable], [Notify], [Converter], [AddToMru], [Local],
[CorruptLoad]) As Workbook
Member of Excel.Workbooks
See also:
http://groups.google.com/group/comp.lang.perl.misc/msg/cddb05950f619e22
> +---------------------------------------------+
>| Jayme Assuncao Casimiro |
>| Graduado em Ciência da Computação |
>| Mestre em Ciência da Computação |
>| Universidade Federal de Minas Gerais - UFMG |
> +---------------------------------------------+
Please use a proper sig separator: dash-dash-space on a line by itself
before your signature.
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(reverse each component and remove .invalid for email address)
comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
------------------------------
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 8639
***************************************