[30107] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 1350 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Mar 10 16:14:55 2008

Date: Mon, 10 Mar 2008 13:14:46 -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, 10 Mar 2008     Volume: 11 Number: 1350

Today's topics:
        Setting up mod_perl asmita.joshi@gmail.com
    Re: Setting up mod_perl <joost@zeekat.nl>
    Re: Setting up mod_perl <glex_no-spam@qwest-spam-no.invalid>
    Re: Setting up mod_perl asmita.joshi@gmail.com
    Re: Setting up mod_perl <joost@zeekat.nl>
    Re: Setting up mod_perl asmita.joshi@gmail.com
    Re: Setting up mod_perl asmita.joshi@gmail.com
    Re: Spreadsheet::ParseExcel - How to get certain Cells <not@home.net>
        Starting a Perl script with no command prompt window <PeteOlcott@gmail.com>
    Re: Starting a Perl script with no command prompt windo <cartercc@gmail.com>
    Re: Starting a Perl script with no command prompt windo <jurgenex@hotmail.com>
    Re: Starting a Perl script with no command prompt windo <ben@morrow.me.uk>
    Re: Starting a Perl script with no command prompt windo <PeteOlcott@gmail.com>
    Re: Starting a Perl script with no command prompt windo <PeteOlcott@gmail.com>
    Re: Starting a Perl script with no command prompt windo <joost@zeekat.nl>
    Re: Starting a Perl script with no command prompt windo <cartercc@gmail.com>
    Re: Starting a Perl script with no command prompt windo <PeteOlcott@gmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Mon, 10 Mar 2008 11:37:29 -0700 (PDT)
From: asmita.joshi@gmail.com
Subject: Setting up mod_perl
Message-Id: <366c7e50-50a3-4ce4-b825-2399d2c99db1@e10g2000prf.googlegroups.com>

Hi,

I am trying to install and get mod_perl up and running.

Apache and perl versions are below:
[Mon Mar 10 11:10:50 2008] [notice] Apache/2.2.8 (Unix) mod_perl/2.0.3
Perl/v5.8.5 configured -- resuming normal operations
---

This is the error I see in apache error_log when firefox tries to open
http://localhost/perl/mod_perl_rules1.pl:
[Mon Mar 10 11:10:55 2008] [error] [client 127.0.0.1] (13)Permission
denied: access to /perl/ denied
[Mon Mar 10 11:11:04 2008] [error] [client 127.0.0.1] (13)Permission
denied: access to /perl/ denied
---

Firefox shows this error:
"Forbidden
You don't have permission to access /perl/mod_perl_rules1.pl on this
server."
---

The file mod_perl_rules1.pl is just the bare minimal perl file from
the mod_perl tutorial.
#!/usr/bin/perl -w
print "Content-type: text/plain\n\n";
print "mod_perl rules!\n";
---

Relevant (acc. to me) parts of httpd.conf are below:
<Directory "/usr/local/apache2/cgi-bin">
    AllowOverride None
    #Options None
    Options +ExecCGI
    Order allow,deny
    Allow from all
</Directory>

<IfModule mime_module>
    AddHandler cgi-script .cgi .pl
</IfModule>

Alias /perl /home/<uname>/modperl
<Directory /home/<uname>/modperl>
    SetHandler perl-script
    PerlResponseHandler ModPerl::Registry
    PerlOptions +ParseHeaders
    Options +ExecCGI
</Directory>
---

Anyone have any clues what is going wrong with my apache/modperl
configuration?

as a note: While installing modperl, 1 test failed out of some 3000+
tests...I moved on with the installation since I didnt quite
understand the error. I don't know where to find details of that
failed test (i may have to install modperl again? or just run make
test again). Let me know if you need to know about this failed
test...till then i will try to find out how to get at the test report
to find out which one failed.

Thanks in advance for your inputs,
Asmita


------------------------------

Date: Mon, 10 Mar 2008 19:50:52 +0100
From: Joost Diepenmaat <joost@zeekat.nl>
Subject: Re: Setting up mod_perl
Message-Id: <87myp64dmb.fsf@zeekat.nl>

asmita.joshi@gmail.com writes:

> This is the error I see in apache error_log when firefox tries to open
> http://localhost/perl/mod_perl_rules1.pl:
> [Mon Mar 10 11:10:55 2008] [error] [client 127.0.0.1] (13)Permission
> denied: access to /perl/ denied
> [Mon Mar 10 11:11:04 2008] [error] [client 127.0.0.1] (13)Permission
> denied: access to /perl/ denied

<snip>

> Anyone have any clues what is going wrong with my apache/modperl
> configuration?

Are you sure the user the *webserver* runs as (not just you), has
permission to read and execute that file?

> as a note: While installing modperl, 1 test failed out of some 3000+
> tests...I moved on with the installation since I didnt quite
> understand the error. I don't know where to find details of that
> failed test (i may have to install modperl again? or just run make
> test again). Let me know if you need to know about this failed
> test...till then i will try to find out how to get at the test report
> to find out which one failed.

You should be able re-run "make test" from the build directory.

-- 
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/


------------------------------

Date: Mon, 10 Mar 2008 14:05:48 -0500
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: Setting up mod_perl
Message-Id: <47d5868d$0$89399$815e3792@news.qwest.net>

asmita.joshi@gmail.com wrote:
> Hi,
> 
> I am trying to install and get mod_perl up and running.
> 
> Apache and perl versions are below:
> [Mon Mar 10 11:10:50 2008] [notice] Apache/2.2.8 (Unix) mod_perl/2.0.3
> Perl/v5.8.5 configured -- resuming normal operations
> ---
> 
> This is the error I see in apache error_log when firefox tries to open
> http://localhost/perl/mod_perl_rules1.pl:
> [Mon Mar 10 11:10:55 2008] [error] [client 127.0.0.1] (13)Permission
> denied: access to /perl/ denied
> [Mon Mar 10 11:11:04 2008] [error] [client 127.0.0.1] (13)Permission
> denied: access to /perl/ denied
> ---
> 
> Firefox shows this error:
> "Forbidden
> You don't have permission to access /perl/mod_perl_rules1.pl on this
> server."
> ---
> 
> The file mod_perl_rules1.pl is just the bare minimal perl file from
> the mod_perl tutorial.
> #!/usr/bin/perl -w
> print "Content-type: text/plain\n\n";
> print "mod_perl rules!\n";
> ---
[...]
> Alias /perl /home/<uname>/modperl
> <Directory /home/<uname>/modperl>
>     SetHandler perl-script
>     PerlResponseHandler ModPerl::Registry
>     PerlOptions +ParseHeaders
>     Options +ExecCGI
> </Directory>
[...]

This has to do with apache, not perl.. but..

If that's the exact entry, then you need to put the actual
directory there instead of '/home/<uname>/modperl'  e.g.
if 'user1' is your username and the directory containing
your script is '/home/user1/modperl':

Alias /perl /home/user1/modperl
<Directory /home/user1/modperl> ...

Both /home/user1 and /home/user1/modperl need to be executable
by the user running the web server. Also, the script residing there
needs to be executable by that user. Without knowing that username,
you could make them all executable:

e.g.
chmod 755 /home/user1 /home/user1/modperl 
/home/user1/modperl/mod_perl_rules1.pl



> ---
> 
> Anyone have any clues what is going wrong with my apache/modperl
> configuration?
> 
> as a note: While installing modperl, 1 test failed out of some 3000+
> tests...I moved on with the installation since I didnt quite
> understand the error. I don't know where to find details of that
> failed test (i may have to install modperl again? or just run make
> test again). Let me know if you need to know about this failed
> test...till then i will try to find out how to get at the test report
> to find out which one failed.
> 
> Thanks in advance for your inputs,
> Asmita


------------------------------

Date: Mon, 10 Mar 2008 12:31:26 -0700 (PDT)
From: asmita.joshi@gmail.com
Subject: Re: Setting up mod_perl
Message-Id: <81d952bc-db05-4868-b79a-bec3af5c6643@d4g2000prg.googlegroups.com>

these are permissions of the directory and of the perl script in that
directory:
(I also tried with my username instead of nobody. same result. )

drwxr-xr-x   2 nobody nobody     4096 Mar 10 12:21 modperl

-rwxrwxrwx  1 nobody nobody 84 Mar  7 16:03 mod_perl_rules1.pl
---

I see the same error..
[Mon Mar 10 12:23:35 2008] [notice] Apache/2.2.8 (Unix) mod_perl/2.0.3
Perl/v5.8.5 configured -- resuming normal operations
[Mon Mar 10 12:23:43 2008] [error] [client 127.0.0.1] (13)Permission
denied: access to /perl denied
[Mon Mar 10 12:23:47 2008] [error] [client 127.0.0.1] (13)Permission
denied: access to /perl/mod_perl_rules1.pl denied
---

I am running make test now. Had tried to run it some time ago, it
failed. If I get it to succeed then I will post the error I see.

Do you have any other places I can check what is going wrong?

Thanks for your responses.
Asmita


------------------------------

Date: Mon, 10 Mar 2008 20:32:51 +0100
From: Joost Diepenmaat <joost@zeekat.nl>
Subject: Re: Setting up mod_perl
Message-Id: <87y78q2x3w.fsf@zeekat.nl>

asmita.joshi@gmail.com writes:

> these are permissions of the directory and of the perl script in that
> directory:
> (I also tried with my username instead of nobody. same result. )
>
> drwxr-xr-x   2 nobody nobody     4096 Mar 10 12:21 modperl

what about the parent directory/directories of that directory?

-- 
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/


------------------------------

Date: Mon, 10 Mar 2008 12:44:32 -0700 (PDT)
From: asmita.joshi@gmail.com
Subject: Re: Setting up mod_perl
Message-Id: <9f29f527-cf7b-47a9-a20e-563dfdbf60b8@s12g2000prg.googlegroups.com>

make test error:
t/api/sendfile..........................ok
t/api/server_const......................FAILED test 3
        Failed 1/3 tests, 66.67% okay
t/api/server_rec........................ok
---

Final prints in make test output:
t/vhost/log.............................ok
Failed Test          Stat Wstat Total Fail  List of Failed
-------------------------------------------------------------------------------
t/api/server_const.t                3    1  3
8 tests and 1 subtest skipped.
Failed 1/236 test scripts. 1/2422 subtests failed.
Files=236, Tests=2422, 200 wallclock secs (147.03 cusr + 32.74 csys =
179.77 CPU)
Failed 1/236 test programs. 1/2422 subtests failed.
[warning] server localhost:8529 shutdown
[  error] error running tests (please examine t/logs/error_log)
+--------------------------------------------------------+
| Please file a bug report: http://perl.apache.org/bugs/ |
+--------------------------------------------------------+
make: *** [run_tests] Error 1
---

Finally, I have copy pasted only the errors from t/logs/error_log
(sorry for the clutter). There seem quite a few errors in it now that
I go back and look carefully.

END in modperl_extra.pl, pid=1544
[Mon Mar 10 12:28:18 2008] [notice] Apache/2.2.8 (Unix) world
domination series/2.0 mod_perl/2.0.3 Perl/v5.8.5 configured --
resuming normal operations
[Mon Mar 10 12:28:18 2008] [info] Server built: Mar  7 2008 10:18:56
[Mon Mar 10 12:28:18 2008] [debug] prefork.c(991): AcceptMutex:
sysvsem (default: sysvsem)

*** The following warn entry is expected and harmless ***
[Mon Mar 10 12:28:37 2008] [info] [client 127.0.0.1] TestAPI::aplog
test in progress
 .
 .
 .
*** The following error entry is expected and harmless ***
[Mon Mar 10 12:28:52 2008] [error] Process 1552 terminates itself\n
[Mon Mar 10 12:28:54 2008] [error] [client 127.0.0.1] Handler for
modperl returned invalid result code 2
[Mon Mar 10 12:28:54 2008] [error] [client 127.0.0.1] Handler for
modperl returned invalid result code 2
# Failed test 3 in /home/ajoshi/software/mod_perl-2.0.3/t/response/
TestAPI/server_const.pm at line 39
 .
 .
 .
*** The following error entry is expected and harmless ***
[Mon Mar 10 12:29:49 2008] [error] [client 127.0.0.1]
APR::Socket::recv: (11) Resource temporarily unavailable at /home/
ajoshi/software/mod_perl-2.0.3/t/response/TestError/runtime.pm line
156\n\tTestError::runtime::mp_error('APR::Socket=SCALAR(0xb4ddbe4)')
called at /home/ajoshi/software/mod_perl-2.0.3/t/response/TestError/
runtime.pm line 75\n
\tTestError::runtime::die_hook_confess_mp_error('Apache2::RequestRec=SCALAR(0xb4e247c)',
'APR::Socket=SCALAR(0xb4ddbe4)') called at /home/ajoshi/software/
mod_perl-2.0.3/t/response/TestError/runtime.pm line 31\n
\tTestError::runtime::handler('Apache2::RequestRec=SCALAR(0xb4e247c)')
called at -e line 0\n\teval {...} called at -e line 0\n

*** The following error entry is expected and harmless ***
[Mon Mar 10 12:29:49 2008] [error] [client 127.0.0.1] Undefined
subroutine &TestError::runtime::no_such_func called at /home/ajoshi/
software/mod_perl-2.0.3/t/response/TestError/runtime.pm line 150.\n
at /home/ajoshi/software/mod_perl-2.0.3/t/response/TestError/
runtime.pm line 150\n
\tTestError::runtime::non_mp_error('APR::Socket=SCALAR(0xb473ffc)')
called at /home/ajoshi/software/mod_perl-2.0.3/t/response/TestError/
runtime.pm line 82\n
\tTestError::runtime::die_hook_confess_non_mp_error('Apache2::RequestRec=SCALAR(0xb3affc4)',
'APR::Socket=SCALAR(0xb473ffc)') called at /home/ajoshi/software/
mod_perl-2.0.3/t/response/TestError/runtime.pm line 31\n
\tTestError::runtime::handler('Apache2::RequestRec=SCALAR(0xb3affc4)')
called at -e line 0\n\teval {...} called at -e line 0\n
 .
 .
 .
*** The following 2 error entries are expected and harmless ***
[Mon Mar 10 12:30:00 2008] [error] [client 127.0.0.1] This filter must
die at /home/ajoshi/software/mod_perl-2.0.3/t/filter/TestFilter/
in_error.pm line 26.\n
[Mon Mar 10 12:30:00 2008] [error] [client 127.0.0.1]
Apache2::RequestIO::read: (120001) filter handler has failed at /home/
ajoshi/software/mod_perl-2.0.3/t/filter/TestFilter/in_error.pm line 41
[Mon Mar 10 12:30:27 2008] [error] [client 127.0.0.1] Undefined
subroutine &TestHooks::error::bomb called at /home/ajoshi/software/
mod_perl-2.0.3/t/hooks/TestHooks/error.pm line 21.\n
[Mon Mar 10 12:30:27 2008] [error] [client 127.0.0.1] Undefined
subroutine &TestHooks::error::bomb called at /home/ajoshi/software/
mod_perl-2.0.3/t/hooks/TestHooks/error.pm line 21.\n
 .
 .
 .
*** The following error entry is expected and harmless ***
[Mon Mar 10 12:31:06 2008] [error] [client 127.0.0.1] File does not
exist: /home/ajoshi/software/mod_perl-2.0.3/t/htdocs/
TestModperl__status
[Mon Mar 10 12:31:06 2008] [error] [client 127.0.0.1] Handler for
modperl returned invalid result code 601
[Mon Mar 10 12:31:06 2008] [error] [client 127.0.0.1] Handler for
modperl returned invalid result code 1
 .
 .
 .
*** The following error entry is expected and harmless ***
Argument "foo9bar" isn't numeric.
Constant subroutine Apache2::Reload::Test::const redefined at /home/
ajoshi/software/mod_perl-2.0.3/blib/lib/ModPerl/Util.pm line 69,
<fh00002perlfunc.pod> line 6718.
Subroutine subpackage redefined at /home/ajoshi/software/
mod_perl-2.0.3/t/lib/Apache2/Reload/Test.pm line 7,
<fh00002perlfunc.pod> line 6718.
Subroutine run redefined at /home/ajoshi/software/mod_perl-2.0.3/t/lib/
Apache2/Reload/Test.pm line 9, <fh00002perlfunc.pod> line 6718.
Subroutine simple redefined at /home/ajoshi/software/mod_perl-2.0.3/t/
lib/Apache2/Reload/Test.pm line 15, <fh00002perlfunc.pod> line 6718.
Prototype mismatch: sub Apache2::Reload::Test::const: none vs () at /
usr/lib/perl5/5.8.5/constant.pm line 108, <fh00002perlfunc.pod> line
6718.
Subroutine prototype redefined at /home/ajoshi/software/mod_perl-2.0.3/
t/lib/Apache2/Reload/Test.pm line 17, <fh00002perlfunc.pod> line 6718.
Constant subroutine Apache2::Reload::Test::const redefined at /home/
ajoshi/software/mod_perl-2.0.3/blib/lib/ModPerl/Util.pm line 69,
<fh00002perlfunc.pod> line 6718.
Subroutine subpackage redefined at /home/ajoshi/software/
mod_perl-2.0.3/t/lib/Apache2/Reload/Test.pm line 7,
<fh00002perlfunc.pod> line 6718.
Subroutine run redefined at /home/ajoshi/software/mod_perl-2.0.3/t/lib/
Apache2/Reload/Test.pm line 9, <fh00002perlfunc.pod> line 6718.
Subroutine simple redefined at /home/ajoshi/software/mod_perl-2.0.3/t/
lib/Apache2/Reload/Test.pm line 15, <fh00002perlfunc.pod> line 6718.
Prototype mismatch: sub Apache2::Reload::Test::const: none vs () at /
usr/lib/perl5/5.8.5/constant.pm line 108, <fh00002perlfunc.pod> line
6718.
Subroutine prototype redefined at /home/ajoshi/software/mod_perl-2.0.3/
t/lib/Apache2/Reload/Test.pm line 17, <fh00002perlfunc.pod> line 6718.
Constant subroutine Apache2::Reload::Test::const redefined at /home/
ajoshi/software/mod_perl-2.0.3/blib/lib/ModPerl/Util.pm line 69,
<fh00002perlfunc.pod> line 6718.
[Mon Mar 10 12:31:35 2008] [error] [client 127.0.0.1] user stas:
authentication failure for "/": Password Mismatch
[Mon Mar 10 12:31:39 2008] [info] Child process pid=1553 is exiting
[Mon Mar 10 12:31:39 2008] [info] Child process pid=1553 is exiting -
server push
END in modperl_extra.pl, pid=1553
[Mon Mar 10 12:31:39 2008] [info] Child process pid=1594 is exiting
[Mon Mar 10 12:31:39 2008] [info] Child process pid=1594 is exiting -
server push
END in TestModperl::print, pid=1594
END in modperl_extra.pl, pid=1594
[Mon Mar 10 12:31:39 2008] [info] Child process pid=1891 is exiting
[Mon Mar 10 12:31:39 2008] [info] Child process pid=1891 is exiting -
server push
END in modperl_extra.pl, pid=1891
[Mon Mar 10 12:31:39 2008] [info] removed PID file /home/ajoshi/
software/mod_perl-2.0.3/t/logs/httpd.pid (pid=1548)
[Mon Mar 10 12:31:39 2008] [notice] caught SIGTERM, shutting down
END in modperl_extra.pl, pid=1548
---

Thanks
Asmita


------------------------------

Date: Mon, 10 Mar 2008 12:52:41 -0700 (PDT)
From: asmita.joshi@gmail.com
Subject: Re: Setting up mod_perl
Message-Id: <eead51a3-31d5-4334-8e23-1ed4296f81d7@s19g2000prg.googlegroups.com>

To reply to your earlier post:

I checked user permissions for the parent directory. /home/<uname> was
executable only for root. So I changed it to 755 now:
drwxr-xr-x  32 nobody nobody 4096 Mar 10 12:23 <uname>

The error changed in apache error_log. It reads this now:
[Mon Mar 10 12:46:26 2008] [error] [client 127.0.0.1] client denied by
server configuration: /home/<uname>/modperl/mod_perl_rules1.pl

It seems I may have moved one step forward..So is the problem now in
my httpd.conf?

Thanks
Asmita


------------------------------

Date: Mon, 10 Mar 2008 16:18:03 +0100
From: Tom Brown <not@home.net>
Subject: Re: Spreadsheet::ParseExcel - How to get certain Cells
Message-Id: <2008031016180316807-not@homenet>

On 2008-03-01 16:29:14 +0100, ccc31807 <cartercc@gmail.com> said:

> I have to play with Perl and Excel from time to time, but my problem
> goes the other way -- writing to an Excel file rather than reading
> one. The crude way is writing the data to a csv file that Excel will
> open natively. This works perfectly for the data but it doesn't
> configure the workbook. The other way is to generate an xml file that
> Excel will open. This also works perfectly, it's more work for me but
> the file will also open in a browser which you can connect with a CSS
> file and pretty it up for users that only want to look at the data,
> not manipulate it. And in fact, you can do both for your two kinds of
> users, those that want to slice and dice the data and those that only
> want to look at it.
> 
> I'd be very interested in your solution. I'd also be interested to
> know why you couldn't open your data file as an xml file and read the
> data from that.

Hello CC,

I am wondering about your interest for my solution as you have to write 
data. As already mentioned by Jim Gibson, Spreadsheet::WriteExcel 
should be the apropriate module for you.

However, here is my solution to parse excel files:

----------------------------cut it here-----------------------------------
#!/usr/bin/perl

use strict;
use Spreadsheet::ParseExcel;
use Data::Dumper;
use Getopt::Long;
use Pod::Usage;
use IO::File;

my %OPT = (
   "excel-file" => undef,
   "startrow" => "1",
   "column" => "9",
   "worksheet" => "0",
);

GetOptions (\%OPT, qw(
  excel-file|x=s
  startrow|s=i
  endrow|e=i
  column|c=i
  worksheet|ws=i
  man|m
  help|h
  debug
)) or pod2usage(2);

if ($OPT{"man"}) {
   pod2usage(-verbose => 2);
}

if (!defined @ARGV) {
   pod2usage(2);
}

my $Excel_file = new Spreadsheet::ParseExcel;
my $oBook = $Excel_file->Parse(<@ARGV>);

my $iSheet = $oBook->{Worksheet}[$OPT{worksheet}];
        my $ws = $oBook->{Worksheet}[$iSheet];


for my $indexRow ( $OPT{startrow} .. $OPT{endrow} ) {
    my $hostname = $ws->{Cells}[$indexRow][$OPT{column}];
    printf "%s.domain.net\n", $hostname->Value;
}


__END__

=head1 NAME

B<parse_excel> - Parse Excel spreadsheets for particular ranges

=head1 SYNOPSIS

B<parse_excel> [options] [file ...]

Options:

=over 8

=item B<-ws | -worksheet>

=item B<-c  | -column>

=item B<-s  | -startrow>

=item B<-e  | -endrow>

=item B<-man>



=head1 DESCRIPTION


The primarily intention of B<parse_excel> is to extract host-lists from
Excel files. Examples are shown below. Take into consideration, that rows,
columns and worksheets start at zero. So, if you have to get cell A1 from
the first worksheet you have to address worksheet 0, column 0 and row 0.



=head1 OPTIONS

=over 2

=item B<-worksheet> I<integer>

Default is 0 for the first worksheet

=item B<-column> I<integer>

Column to be collected. Default is 9 for hostnames (old)

=item B<-startrow> I<integer>

Starting row to parse from. Default = 1

=item B<-endrow> I<integer>

Last row to parse data from

=item B<-man>

Show complete usage information

=back

=head1 EXAMPLES

A basic test just to get the value from worksheet 1, cell A1 (which 
means the value from column 0, row 0 from worksheet 0)

    parse_excel -ws 0 -c 0 -s 0 -e 0 spreadsheet.xls

Get from the first worksheet, column 0 the rows 0, 1 and 2 (bear in 
mind the defaults mentioned above):

    parse_excel -e 3 spreadsheet.xls

Get rows 2 till 242 from worksheet 0, column 0 and redirect it into a file:

    parse_excel -s 1 -e 241 spreadsheet.xls > hosts.lst

Extract some cells using long options:

    parse_excel -column 11 -startrow 3 -endrow 9 data/spreadsheet.xls

Get from the second worksheet and column 10 the rows 4, 5, 6, 7 and 8 
(bear in mind that counters start at 0!!!)

    parse_excel -ws 1 -c 9 -s 3 -e 7 data/spreadsheet.xls


=head1 FILES

=over 3

=item I<spreadsheet.xls>

Take any Excel95, Excel97 or Excel2000 file as input file.

=back

=head1 SEE ALSO

=over 2

=item I<auto_change_config>

Examine I<auto_change_config> to perform configuration-rollouts by 
telnet or ssh for large-scaled amount of devices.

=back

=head1 ERRORS

=over 2

=item <Can't call method "Value" on an undefined value at ./parse_excel 
line 51.>

The specified range covers fields (i. e. cells) without any value. 
Specify ranges
for cells which contain data to get rid of this message or just ignore it.

=back

=head1 AUTHOR

2008, Tom Brown :: <Not@home.net>



------------------------------

Date: Mon, 10 Mar 2008 07:10:21 -0700 (PDT)
From: PeteOlcott <PeteOlcott@gmail.com>
Subject: Starting a Perl script with no command prompt window
Message-Id: <15de6ef2-86db-468a-93b7-95fd1b424815@n77g2000hse.googlegroups.com>

Does anyone know how to start a Perl script as an MS Windows XP Pro
"Scheduled Task" and either have no "command prompt" window, or have
the "command prompt" window be created as minimized?


------------------------------

Date: Mon, 10 Mar 2008 07:39:52 -0700 (PDT)
From: ccc31807 <cartercc@gmail.com>
Subject: Re: Starting a Perl script with no command prompt window
Message-Id: <c4a83c7c-bb85-43ed-a766-48bdf799e962@q78g2000hsh.googlegroups.com>

On Mar 10, 10:10 am, PeteOlcott <PeteOlc...@gmail.com> wrote:
> Does anyone know how to start a Perl script as an MS Windows XP Pro
> "Scheduled Task" and either have no "command prompt" window, or have
> the "command prompt" window be created as minimized?

Create a batch file that runs the Perl script. Schedule the batch file
as a scheduled task.

CC


------------------------------

Date: Mon, 10 Mar 2008 14:50:49 GMT
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: Starting a Perl script with no command prompt window
Message-Id: <vjiat3tqec20cfi3jvuo3slq08dneqeg8p@4ax.com>

PeteOlcott <PeteOlcott@gmail.com> wrote:
>Does anyone know how to start a Perl script as an MS Windows XP Pro
>"Scheduled Task" 

Same as any other scheduled task.

>and either have no "command prompt" window, or have
>the "command prompt" window be created as minimized?

Call wperl.exe (part of AcitveState Perl) instead of perl.exe as the
interpreter.

jue


------------------------------

Date: Mon, 10 Mar 2008 15:03:08 +0000
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Starting a Perl script with no command prompt window
Message-Id: <c6vfa5-q86.ln1@osiris.mauzo.dyndns.org>


Quoth PeteOlcott <PeteOlcott@gmail.com>:
> Does anyone know how to start a Perl script as an MS Windows XP Pro
> "Scheduled Task" and either have no "command prompt" window, or have
> the "command prompt" window be created as minimized?

If you use wperl.exe instead of perl.exe, you don't get a command
window. Of course, if you call any external programs, they probably *do*
create one, so don't do that.

Ben



------------------------------

Date: Mon, 10 Mar 2008 08:57:03 -0700 (PDT)
From: PeteOlcott <PeteOlcott@gmail.com>
Subject: Re: Starting a Perl script with no command prompt window
Message-Id: <60541f97-b3ac-407f-ba3d-1c2fe04ce0df@8g2000hse.googlegroups.com>

On Mar 10, 10:03=A0am, Ben Morrow <b...@morrow.me.uk> wrote:
> Quoth PeteOlcott <PeteOlc...@gmail.com>:
>
> > Does anyone know how to start a Perl script as an MS Windows XP Pro
> > "Scheduled Task" and either have no "command prompt" window, or have
> > the "command prompt" window be created as minimized?
>
> If you use wperl.exe instead of perl.exe, you don't get a command
> window. Of course, if you call any external programs, they probably *do*
> create one, so don't do that.
>
> Ben

None of these ideas seemed to work, but, I may have implemented them
incorrectly.


------------------------------

Date: Mon, 10 Mar 2008 09:54:54 -0700 (PDT)
From: PeteOlcott <PeteOlcott@gmail.com>
Subject: Re: Starting a Perl script with no command prompt window
Message-Id: <4a283f53-2213-4ad5-9950-8e4e1e690416@m3g2000hsc.googlegroups.com>

On Mar 10, 9:39=A0am, ccc31807 <carte...@gmail.com> wrote:
> On Mar 10, 10:10 am, PeteOlcott <PeteOlc...@gmail.com> wrote:
>
> > Does anyone know how to start a Perl script as an MS Windows XP Pro
> > "Scheduled Task" and either have no "command prompt" window, or have
> > the "command prompt" window be created as minimized?
>
> Create a batch file that runs the Perl script. Schedule the batch file
> as a scheduled task.
>
> CC

I tried this and it did not work. I also tried various combinations
of:
cmd /min


------------------------------

Date: Mon, 10 Mar 2008 18:01:34 +0100
From: Joost Diepenmaat <joost@zeekat.nl>
Subject: Re: Starting a Perl script with no command prompt window
Message-Id: <87wsoa4ioh.fsf@zeekat.nl>

PeteOlcott <PeteOlcott@gmail.com> writes:

> I tried this and it did not work. I also tried various combinations
> of:
> cmd /min

How are you starting the program?

Here's what I just did:

rename the program using a new extension, for instance:

program.gpl

double click. then choose "select program", "browse..." (I'm guessing
these names, I've got a Dutch windows install) and choose
c:\perl\bin\wperl.exe

Done.

-- 
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/


------------------------------

Date: Mon, 10 Mar 2008 10:08:03 -0700 (PDT)
From: ccc31807 <cartercc@gmail.com>
Subject: Re: Starting a Perl script with no command prompt window
Message-Id: <8cdd5d02-1b45-445f-8707-03ccc9a13666@b64g2000hsa.googlegroups.com>

On Mar 10, 12:54 pm, PeteOlcott <PeteOlc...@gmail.com>
> I tried this and it did not work. I also tried various combinations
> of:
> cmd /min

Write a 'hello world' program and save it like this:

#helloworld.plx
print "Hello, world\n";

Write a batch file and save it like this:
REM run_hello
perl helloworld.plx > hello.txt

(The part after the greater than sign redirects the output of the
helloworld program to a text file so you can see if it ran.)

In your Windows Explorer or My Computer screen you should see two
files, the plx file and the batch file. Double click on the batch file
and check to see if it wrote the output to hello.txt.

CC


------------------------------

Date: Mon, 10 Mar 2008 11:34:34 -0700 (PDT)
From: PeteOlcott <PeteOlcott@gmail.com>
Subject: Re: Starting a Perl script with no command prompt window
Message-Id: <256e05ca-a903-4e2c-8b16-b56746fc034a@x41g2000hsb.googlegroups.com>

On Mar 10, 12:01=A0pm, Joost Diepenmaat <jo...@zeekat.nl> wrote:
> PeteOlcott <PeteOlc...@gmail.com> writes:
> > I tried this and it did not work. I also tried various combinations
> > of:
> > cmd /min
>
> How are you starting the program?
>
> Here's what I just did:
>
> rename the program using a new extension, for instance:
>
> program.gpl
>
> double click. then choose "select program", "browse..." (I'm guessing
> these names, I've got a Dutch windows install) and choose
> c:\perl\bin\wperl.exe
>
> Done.
>
> --
> Joost Diepenmaat | blog:http://joost.zeekat.nl/| work:http://zeekat.nl/

This worked. It still has a tiny little screen flash as soon as it
gets done executing, but, this is far less annoying than the console
window, popping up.


------------------------------

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 V11 Issue 1350
***************************************


home help back first fref pref prev next nref lref last post