Perl from Terminal in OSX

2004-03-18 Thread B McKee
From: David Gilden <[EMAIL PROTECTED]> Date: Thu Mar 18, 2004 12:27:57 PM Canada/Eastern To: [EMAIL PROTECTED] Subject: running PERL from CMD line OSX Trying to run a perl script in OSX shell, and It is not working, what am I missing? here is what I am typing: perl -e test.pl #!/usr/bin/perl #

Comments on this suggestion

2004-04-27 Thread B McKee
I tripped over this chunk of code today - #!/usr/bin/perl -w BEGIN { use File::Basename; unshift @INC, dirname($0); } use strict; use module_whatever; ... if I'm reading this right it would let you include a required module your users may or may not have with your own script. No

Default FTP agent for CPAN

2004-05-06 Thread B McKee
CPAN wants to use Net::FTP but it doesn't work behind our corporate firewall. Ncftp or wget works fine, once the endless timeout wait is over. I found this on a perl list, but it's not working for me. I'm using perl 5.6 on OSX. Suggestions? With perl 5.8 having libnet as standard and the generall

replacing multiple matches with an array

2005-01-17 Thread B McKee
Hi All I have this bit of code in a program I'm working on. while () { next if /\f/ ; next if /^DATE : / ; next if /^\s{15,}PART / ; next if /^COUNTER QTY/ ; next if /^\s+$/ ; print ; # debugging purpo

Re: beginners Digest 18 Jan 2005 12:52:35 -0000 Issue 2433

2005-01-18 Thread B McKee
Apologies for the layout and busted thread - I'm on digest mode From: "JupiterHost.Net" <[EMAIL PROTECTED]> I believe this will do what you want: next if grep { $rawreport_item =~ /$_/ } @possibleMatches; Just make sure the regexes in @possibleMatches are not user supplied or they may try sneaky

Scope issue

2005-01-19 Thread B McKee
Hi All I seem to have a problem with scope and/or handling objects here. If I use 'my worksheet = $workbook->add_worksheet("$branchNumber") or die "Couldn't add worksheet $branchNumber \n" ;' then I get 'use of uninitialized variable' when I try to add to the worksheet outside the innermost if {

use strict and filehandles

2004-01-20 Thread B McKee
Hi All, I'm having trouble understanding what use strict is trying to tell me. If I have run this program -CODE--- #!/usr/bin/perl -wT # use warnings and turn on data tainting use CGI qw(:standard); $CGI::POST_MAX=1024 * 100; $CGI::DISABLE_UPLOADS = 1; use stric

Re: use strict and filehandles

2004-01-21 Thread B McKee
On Tuesday, January 20, 2004, at 10:34 AM, B McKee wrote: Hi All, I'm having trouble understanding what use strict is trying to tell me. If I have run this program ...snipped open(MESSAGE, "$datafile") or die "Cannot open datafile: $!"; while (!eof(MESSAGE)) {

Re: beginners Digest 20 Jan 2004 21:20:31 -0000 Issue 1978

2004-01-22 Thread B McKee
On Tue, 2004-01-20 at 16:20, Jan Eden wrote: > > I had a similar problem passing a filehandle to a sub and learned that I had to use > the typeglob instead. > HTH,Jan > > B McKee wrote: > >Hi All, > >I'm having trouble understanding what use strict is tryin

subroutine placement (Layout conventions)

2004-02-26 Thread B McKee
Hi All, I'm slowly creating my Perl Masterpiece (tm) I'll let ya all giggle over it when I'm done :-) At any rate - It's done what I believe you call "top-down". I declare the subs, then have the code for the main program, then the subroutine code blocks. My question is what order should t