reg exp continued need pulled from reference

2006-12-13 Thread Derek B. Smith
I want to extend any apologies necessary for my last post. I am not a violent person its just I get annoyed when some people are negative, or to me, are condescending. I was not mad just upset and bothered. No biggy and the past is in the past. : ) -- To unsubscribe, e-mail: [EMAIL PROTECTED] F

RE: reg exp continued need pulled from reference

2006-12-13 Thread Derek B. Smith
--- "Charles K. Clarkson" <[EMAIL PROTECTED]> wrote: > Derek B. Smith <mailto:[EMAIL PROTECTED]> > wrote: > > > : I then tried > > Try something simpler, not more complex. Test > this case. > > my @hosts = ( 'sun' ); &

Re: reg exp continued need pulled from reference

2006-12-13 Thread Derek B. Smith
--- Lawrence Statton XE2/N1GAK <[EMAIL PROTECTED]> wrote: > > --- Lawrence Statton XE2/N1GAK > <[EMAIL PROTECTED]> > > I am using Spreadsheet::WriteExcel to populate > certain > > columns which is working, but in column A for > example > > I am using the method write_col which requires a > > refer

Re: reg exp continued need pulled from reference

2006-12-13 Thread Derek B. Smith
--- Lawrence Statton XE2/N1GAK <[EMAIL PROTECTED]> wrote: > If you're dealing with variable length strings, > separated by some kind > of character, then regexp is the tool you want, not > substr. > > This snippet will work so long as hostname and > platform name are made > up of \w ... if not, su

Re: reg exp

2006-12-12 Thread Derek B. Smith
--- "D. Bolliger" <[EMAIL PROTECTED]> wrote: > Derek B. Smith am Dienstag, 12. Dezember 2006 23:19: > > I have a string like so: > > > > /home/dbsmith/passwd.oftappp1.hpux and I need to > parse > > out oftappp1 and hpux. > > > > I have tr

reg exp

2006-12-12 Thread Derek B. Smith
I have a string like so: /home/dbsmith/passwd.oftappp1.hpux and I need to parse out oftappp1 and hpux. I have tried to use substr and and regexp with =~. Here is what I have tried, but need some help cause I am getting frustrated. NOTE: strings after passwd are variable in length, could be 3-10

Re: return 1

2006-12-08 Thread Derek B. Smith
--- Jay Savage <[EMAIL PROTECTED]> wrote: > On 12/8/06, Derek B. Smith > <[EMAIL PROTECTED]> wrote: > > Why is return 1 coded at the end of many programs. > For > > example: > > > > I know it means true but what does this do and > why? > > D

return 1

2006-12-08 Thread Derek B. Smith
Why is return 1 coded at the end of many programs. For example: I know it means true but what does this do and why? thank you derek #!/usr/bin/perl #use strict; my $user_name = qq(dsmithxx); my $user_password = qq(); my $sql_server = qq(x); my ($dbh,$drh,$stmt); local ($whichmethod,$form

Re: Perl Query - Conversion of EXE file

2006-12-07 Thread Derek B. Smith
> > > The input for the EXE has to be taken from the > file provided by the > > > user.AndThe EXE shud get invoked by just > dragging and dropping the > > > input file on the EXE. > > > > > > Assume, the input file is some text file > containing some raw data. > > > > > > How should this be done? >

Fwd: failure notice

2006-12-06 Thread Derek B. Smith
6 14:02:29 PST Date: Tue, 5 Dec 2006 14:02:29 -0800 (PST) From: "Derek B. Smith" <[EMAIL PROTECTED]> Subject: Re: Net::EasyTCP To: beginners@perl.org In-Reply-To: <[EMAIL PROTECTED]> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encodi

Re: Net::EasyTCP

2006-12-05 Thread Derek B. Smith
--- zentara <[EMAIL PROTECTED]> wrote: > On Sat, 2 Dec 2006 08:08:22 -0800 (PST), > [EMAIL PROTECTED] > ("Derek B. Smith") wrote: > > >I dont understand > "there is no xs component" and > I > >dont understand > "So you could actu

Re: Net::EasyTCP

2006-12-02 Thread Derek B. Smith
--- zentara <[EMAIL PROTECTED]> wrote: > On Fri, 1 Dec 2006 20:31:11 -0800 (PST), > [EMAIL PROTECTED] > ("Derek B. Smith") wrote: > > >I was hoping for socket data transfers to mimic an > >sftp/ftp get without having to deploy code to the > >clients

Re: Net::EasyTCP

2006-12-01 Thread Derek B. Smith
--- "D. Bolliger" <[EMAIL PROTECTED]> wrote: > Derek B. Smith am Freitag, 1. Dezember 2006 20:31: > > --- zentara <[EMAIL PROTECTED]> wrote: > > > On Thu, 30 Nov 2006 13:34:16 -0800 (PST), > > > [EMAIL PROTECTED] > > > >I need to gat

Re: Net::EasyTCP

2006-12-01 Thread Derek B. Smith
--- zentara <[EMAIL PROTECTED]> wrote: > On Thu, 30 Nov 2006 13:34:16 -0800 (PST), > [EMAIL PROTECTED] > ("Derek B. Smith") wrote: > > >Hello... : ) > > > >I need to gather a single filename on hundreds of > >servers ranging in *UX flavors

Re: Net::EasyTCP

2006-12-01 Thread Derek B. Smith
--- zentara <[EMAIL PROTECTED]> wrote: > On Thu, 30 Nov 2006 13:34:16 -0800 (PST), > [EMAIL PROTECTED] > ("Derek B. Smith") wrote: > > >Hello... : ) > > > >I need to gather a single filename on hundreds of > >servers ranging in *UX flavors

Re: Net::EasyTCP

2006-12-01 Thread Derek B. Smith
--- zentara <[EMAIL PROTECTED]> wrote: > On Thu, 30 Nov 2006 13:34:16 -0800 (PST), > [EMAIL PROTECTED] > ("Derek B. Smith") wrote: > > >Hello... : ) > > > >I need to gather a single filename on hundreds of > >servers ranging in *UX flavors

Net::EasyTCP

2006-11-30 Thread Derek B. Smith
Hello... : ) I need to gather a single filename on hundreds of servers ranging in *UX flavors from AIX, HP, Solaris, RH Linux and Tru64 then store them on on HPUX server. I was initially thinking an scp command like so foreach my $server in (@servers) scp /etc/passwd /tmp/passwd.$SERVER but not

Re: Question regarding use of multiple Perl versions

2006-11-30 Thread Derek B. Smith
--- Jay Savage <[EMAIL PROTECTED]> wrote: > On 11/30/06, Hotz, Harry <[EMAIL PROTECTED]> wrote: > > > > I have a new AIX 5.3 server that comes > with a default Perl 5.82. > > I have a DB2 programmer that has scripts from an > old AIX 4.3 server that > > used Perl 5.005_03. He will have to

RE: win32 services

2006-10-27 Thread Derek B. Smith
erimentation to > figure it out yourself. > > Also keep in mind that what shows up in the Services > MMC are not ALL the > Services the OS recognizes, but only the ones the > writers of each > Service chose to display in the MMC. Go figure. > > > > -Orig

win32 services

2006-10-27 Thread Derek B. Smith
Hello, I want to get a listing of Window services and each associated "status" and its "startup type." I looked at Win32::Daemon::Simple but wasn't sure if this is a good module for doing so? W/out using a module, Is there a registry entry for each service I could parse or a database that I

Re: Question about Installed Packages

2006-10-20 Thread Derek B. Smith
--- Chris Share <[EMAIL PROTECTED]> wrote: > Thanks for the info. Isn't this what the Perl > Package Manager is for? > > Rob Dixon wrote: > > Chris Share wrote: > > > >> I'm trying to implement the following code: > >> > >> > ## > >> > >> requ

Re: Evaluation of ++ different in C and perl?

2006-10-20 Thread Derek B. Smith
--- Paul Johnson <[EMAIL PROTECTED]> wrote: > On Fri, Oct 20, 2006 at 08:11:36AM -0500, > [EMAIL PROTECTED] wrote: > > > Computer software consists of only two > components: ones and > > zeros, in roughly equal proportions. All that is > required is to > > sort them into the correct order

Re: More Info About $| = 1;

2006-10-19 Thread Derek B. Smith
--- Andreas Puerzer <[EMAIL PROTECTED]> wrote: > Derek B. Smith schrieb: > > > -- Andreas Puerzer <[EMAIL PROTECTED]> wrote: > > > > [snipped for brevity] > > >> > >>So, to the OP, if you want to take input from > your > >

Re: Evaluation of ++ different in C and perl?

2006-10-19 Thread Derek B. Smith
--- Rob Dixon <[EMAIL PROTECTED]> wrote: > Derek B. Smith wrote: > > --- "Dr.Ruud" <[EMAIL PROTECTED]> wrote: > > > >> Norbert Preining schreef: > >> > >>> The Perl Book says: Auto increment and decrement > >> wor

Re: Evaluation of ++ different in C and perl?

2006-10-19 Thread Derek B. Smith
--- "Dr.Ruud" <[EMAIL PROTECTED]> wrote: > Norbert Preining schreef: > > > The Perl Book says: Auto increment and decrement > work as in > > C. So if I take this C program: > > #include > > #include > > int main() { > > int a; > > int b; > > a=3; > > b=(++a)+

Re: More Info About $| = 1;

2006-10-19 Thread Derek B. Smith
--- "Derek B. Smith" <[EMAIL PROTECTED]> wrote: > -- Andreas Puerzer <[EMAIL PROTECTED]> wrote: > > > Tom Phoenix schrieb: > > > On 10/18/06, Chris Share <[EMAIL PROTECTED]> > > wrote: > > > > > >> I've got a q

Re: More Info About $| = 1;

2006-10-19 Thread Derek B. Smith
-- Andreas Puerzer <[EMAIL PROTECTED]> wrote: > Tom Phoenix schrieb: > > On 10/18/06, Chris Share <[EMAIL PROTECTED]> > wrote: > > > >> I've got a question about $| = 1; > > > > > > > >> If I add $| = 1; at the top of the program this > fixes the problem and > >> the program runs as expect

Re: Non-deprecated way to capture array length

2006-10-09 Thread Derek B. Smith
--- Marc Sacks <[EMAIL PROTECTED]> wrote: > I needed to find out the length of an array and did > it by referencing > the array in scalar context. However, "use warnings" > indicated that this > is a deprecated feature. Is there a non-deprecated > way to do this > (other than looping through t

canonpath

2006-10-06 Thread Derek B. Smith
I dont understand what the point of canonpath is here: It seems to me canonpath only appply so links. ##-- Show me all installed Modules --## use File::Find 'find'; use File::Spec::Functions; print "Your installed modules on $^O are:\n"; print "-" x 38,"\n"; find { wanted => sub { print cano

RE: Can't get Sudo.pm to run my command but it works from a prompt

2006-10-05 Thread Derek B. Smith
--- RICHARD FERNANDEZ <[EMAIL PROTECTED]> wrote: > > Did you edit the sudoers file using visudo -f > "file" > > Yes. > > > Show us the sudoers file using cat -etu "file". > > # cat -etu /usr/local/etc/sudoers > > /tmp/sudoers.richf > # less /tmp/sudoers.richf > # sudoers file. > # > # This file

Re: Can't get Sudo.pm to run my command but it works from a prompt

2006-10-05 Thread Derek B. Smith
-- RICHARD FERNANDEZ <[EMAIL PROTECTED]> wrote: > Hi folks, > > I have the following in a CGI script: > > > When this code gets run (via webpage) I get the > following in the > error_log: > > > > output: > > result: 256 > > STDOUT: > STDERR: > We trust you have received the usual lectu

Re: Smart assignment

2006-10-03 Thread Derek B. Smith
> returns "true" or "false" (1 or '') and in list > context it returns the > contents of any capturing parentheses in the > pattern. > > The expression: > > ( $ptypeline =~ /movable.+(sine|geo|radial|ortho)/i > )[ 0 ] > > is a list slice so the regular expression is in list > context but the sl

RE: Scope

2006-10-02 Thread Derek B. Smith
-- "Charles K. Clarkson" <[EMAIL PROTECTED]> wrote: > John Ackley wrote: > > > : while( ($service) = $SERVICE->fetchrow_array ) { > > According to the DBI docs: > >"If there are no more rows or if an error occurs, > then fetchrow_array returns an empty list." > > When a value

Re: Listerine

2006-10-02 Thread Derek B. Smith
-- Mathew Snyder <[EMAIL PROTECTED]> wrote: > Sorry. Just had to do it. :) > > -- > Mathew Snyder > > -- It got a laugh from me! thank you __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.c

Re: interpoliation within regexp

2006-09-29 Thread Derek B. Smith
-- "Mumia W." <[EMAIL PROTECTED]> wrote: > On 09/29/2006 12:15 PM, Derek B. Smith wrote: > > --- "D. Bolliger" <[EMAIL PROTECTED]> wrote: > > > >> Derek B. Smith am Donnerstag, 28. September 2006 > >> 22:28: >

using local when appropriate

2006-09-29 Thread Derek B. Smith
sub getfile { my $filename = shift; open F, "< $filename" or die "open failed: $!"; my $contents = ''; while () { $contents .= $_; } close F; return $contents; } This is inefficient, because the operator makes Perl go to all the trouble of breaking the file into lines and returning the

Re: interpoliation within regexp

2006-09-29 Thread Derek B. Smith
am confused. Will you explain again? I think you missed an explanation step between a and b? Reagardless it work so thank you. --- "D. Bolliger" <[EMAIL PROTECTED]> wrote: > Derek B. Smith am Donnerstag, 28. September 2006 > 22:28: > > > Why not just specify a non-d

Re: interpoliation within regexp

2006-09-28 Thread Derek B. Smith
> Why not just specify a non-digit for the first > character: > > my @a = ( 0 .. 9, 'a' .. 'z', 'A' .. 'Z'); > > my $password = join '', $a[ 10 + rand( @a - 10 ) ], > map $a[ rand @a ], 1 .. 5; > > > > John Ok great, but I do not fully understand this. Will you explain in English? thx _

Re: interpoliation within regexp

2006-09-28 Thread Derek B. Smith
--- "Mumia W." <[EMAIL PROTECTED]> wrote: > On 09/28/2006 12:04 PM, Derek B. Smith wrote: > > ** > > The input data is a 6 character randomized string > that > > could start with a # such as 6FhJ9Z. If it does

Re: interpoliation within regexp

2006-09-28 Thread Derek B. Smith
--- "Mumia W." <[EMAIL PROTECTED]> wrote: > On 09/28/2006 08:16 AM, Derek B. Smith wrote: > > --- "Derek B. Smith" <[EMAIL PROTECTED]> > > wrote: > > > >> I need to substitute a conversion using chr, but > >> have > >&

Re: interpoliation within regexp

2006-09-28 Thread Derek B. Smith
-- "Derek B. Smith" <[EMAIL PROTECTED]> wrote: > --- "Derek B. Smith" <[EMAIL PROTECTED]> > wrote: > > > I need to substitute a conversion using chr, but > > have > > failed on multiple attempts. Basically if the > first &g

Re: interpoliation within regexp

2006-09-28 Thread Derek B. Smith
--- "Derek B. Smith" <[EMAIL PROTECTED]> wrote: > I need to substitute a conversion using chr, but > have > failed on multiple attempts. Basically if the first > element contains a # then convert it. Will anyone > advise? > > thank you > derek > >

interpoliation within regexp

2006-09-27 Thread Derek B. Smith
I need to substitute a conversion using chr, but have failed on multiple attempts. Basically if the first element contains a # then convert it. Will anyone advise? thank you derek #if first char is a-z then print it else warn #chop string into individual characters my @chars = unpack ("A1" x l

Re: transition to Perl developer

2006-09-20 Thread Derek B. Smith
-- "JupiterHost.Net" <[EMAIL PROTECTED]> wrote: > > I'm not sure what Derek is looking for, either, > but have a look at: > > > > * bestpractical.com/rt/ > > An open-source request/bug/job tracker, which is > also used as part of > > the CPAN projcet: rt.cpan.org > > > > * www.cpanforum.com >

Re: transition to Perl developer

2006-09-19 Thread Derek B. Smith
--- "JupiterHost.Net" <[EMAIL PROTECTED]> wrote: > > Derek B. Smith wrote: > > > > Is there a Perl open source project currently > underway > > wherein anyone can contribute by writing code for > the > > projects completion such as Jbill

Re: transition to Perl developer

2006-09-19 Thread Derek B. Smith
--- Lee Goddard <[EMAIL PROTECTED]> wrote: > > Most of the docs you'll ever need are in perldoc > > Perldoc perl > Perldoc perltoc Table of contents > perlbootPerl OO tutorial for > beginners > perltootPerl OO tutorial, part 1 >

RE: [perl #40345] splice question

2006-09-19 Thread Derek B. Smith
And why would this be? Becasue it does not load the entire data set at once or aka one at a time? >If you really need to do this in place due to memory >constraints, I >would advise to run the iteration from back to front, >i.e. >foreach my $indx (reverse 0..$#$ref_array) __

RE: transition to Perl developer

2006-09-19 Thread Derek B. Smith
--- Lee Goddard <[EMAIL PROTECTED]> wrote: > --- Derek B. Smith > [mailto:[EMAIL PROTECTED] wrote: > > --- Lee Goddard <[EMAIL PROTECTED]> wrote: > > > > > > > > Most of the docs you'll ever need are in perldoc > > > > >

RE: transition to Perl developer

2006-09-19 Thread Derek B. Smith
; > -- > Lee Goddard > > Independent Contractor, Software > Development/Analysis > BBC Radio & Music Interactive > * Room 718 | Henry Wood Hs | Regents St | London W1 > 1AA | UK * 020 776 > 50849 * lee(at)server-sidesystems.ltd.uk > > > -Original Message--

transition to Perl developer

2006-09-18 Thread Derek B. Smith
To the Gurus, I am in the process of making a transition over to a Perl Developer. From a knowledge standpoint, is there anything I should know or need to know. For example I do not know OO that much. What about any specific modules that are useful? Any other advice? thank you derek ___

Re: Archive::Zip and hash issues

2006-09-14 Thread Derek B. Smith
--- Tom Phoenix <[EMAIL PROTECTED]> wrote: > On 9/14/06, Derek B. Smith > <[EMAIL PROTECTED]> wrote: > > > my %subdir_for = ( > > 'bpjava\-msvc' => 23, > > 'bpjava\-susvc' => 24, > > 'bpjava\-usvc'=&

Archive::Zip and hash issues

2006-09-14 Thread Derek B. Smith
I need some help in this again. Firt I built a hash consisting of 52 unique subdir names, but 3 of these sub-dirs have a dash like so bpjava-msvc. During the translation is the coorect way to ignore the by using the \? my %subdir_for = ( 'bpjava\-msvc' => 23, 'bpjava\-susvc' => 24, 'bpja

Re: Archive Zip

2006-09-12 Thread Derek B. Smith
--- Rob Dixon <[EMAIL PROTECTED]> wrote: > Derek B. Smith wrote: > > > > --- Tom Phoenix <[EMAIL PROTECTED]> wrote: > > > >>On 9/11/06, Derek B. Smith > >><[EMAIL PROTECTED]> wrote: > >> > >>>I need to compress a bunc

Re: Archive Zip

2006-09-12 Thread Derek B. Smith
--- Tom Phoenix <[EMAIL PROTECTED]> wrote: > On 9/11/06, Derek B. Smith > <[EMAIL PROTECTED]> wrote: > > > I need to compress a bunch of files, so instead of > > making a system call to gzip I figured to try out > > Archive::Zip. > > After run

Archive Zip

2006-09-11 Thread Derek B. Smith
I need to compress a bunch of files, so instead of making a system call to gzip I figured to try out Archive::Zip. After running this code it creates a new file but is larger in size. How do I use archive zip to simply zip files so that they are generally smaller in size? thank you derek #!/usr/

Re: general subroutine question

2006-08-30 Thread Derek B. Smith
--- "D. Bolliger" <[EMAIL PROTECTED]> wrote: > Derek B. Smith am Mittwoch, 30. August 2006 20:44: > > > store where? > > > > > > > or pass? > > > > > > pass to what? > > > > > > > > > Did y

Re: general subroutine question

2006-08-30 Thread Derek B. Smith
> store where? > > > or pass? > > pass to what? > > > Did you mean: Is there a way for a subroutine to > react to a call with to many > arguments? > > sub accept_max_5_arguments { > die 'too many arguments!' if @_ > 5; > } > > sub accept_max_x_arguments { # apart from the first > my $m

general subroutine question

2006-08-30 Thread Derek B. Smith
All, Is there a commonly known way or method to limit the number of arguments that a subroutine can store or pass? thank you derek __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- To

Re: hash lookup table

2006-08-29 Thread Derek B. Smith
> > # This might come closer to what you want. > > foreach my $log (@NBlogs2) { >if ($log =~ m{([[:alpha:]]+)/log.\d+}) { > my $word = $1; > my $number = $subdir_for{$word}; > qx(echo cp $log $oldir/$number); >} > }

Re: hash lookup table

2006-08-28 Thread Derek B. Smith
--- "John W. Krahn" <[EMAIL PROTECTED]> wrote: > Derek B. Smith wrote: > > All, > > Hello, > > > I am trying to run logic that will copy/delete 3 > > versions of log.\d+ files to their respective > > directories. Because there are

Re: odd variable result

2006-08-28 Thread Derek B. Smith
try this syntax: my $test = system ("/usr/bin/snmpget -v1 10.1.11.18 -c secret .1.3.6.1.4.1.710.7.1.5.1.23.1.13.1|awk '{print $4}'"); or my $test = qx(you command above w/no quotes needed); or open (SNMP, "snmpget -v1 10.1.11.18 -c secret .1.3.6.1.4.1.710.7.1.5.1.23.1.13.1" ) or die "failed

hash lookup table

2006-08-28 Thread Derek B. Smith
All, I am trying to run logic that will copy/delete 3 versions of log.\d+ files to their respective directories. Because there are so many directories, I have built a hash table instead of using a bunch of "if else conditions" with reg exps. My problem is it is not returning the words_num trans

hash look up table for rolling logs

2006-08-25 Thread Derek B. Smith
All, I am trying to run logic that will copy/delete 3 versions of log.\d+ files to their respective directories. Because there are so many directories, I have built a hash table instead of using a bunch of "if else conditions" with reg exps. My problem is it is not returning the words_num trans

Re: Intersection for each pair of arrays

2006-08-23 Thread Derek B. Smith
>From the previous emails, I do not understand what parts of this code is doing and why is this practical? The part is $union{$e} = 1 and $isect{$e} = 1 . Also %count is never used. thank you derek use warnings; @a = (1, 3, 5, 6, 7, 8); @b = (2, 3, 5, 7, 9); @union = @intersect= (); %union =

RE: File Copy

2006-08-22 Thread Derek B. Smith
Apparently I can no longer send email to this list from my work account because of: The following message to was undeliverable. The reason for the problem: 5.1.0 - Unknown address error 550-'Mail from cardinal.com rejected because it does not accept bounces. This violates RFC 821/2505/2821 http://