Syntax error on use Cwd qw(abs_path);

2011-05-28 Thread Derek
Hello, I am getting the following error: bash: /var/www/html/bugzilla/email_in.pl: line 2: syntax error near unexpected token `(' bash: /var/www/html/bugzilla/email_in.pl: line 2: `use Cwd qw(abs_path);' The contents of this file are: #!/usr/bin/perl use Cwd qw(abs_path); Thats all. I know basi

examples or question on generating packets

2002-08-22 Thread Winchester, Derek S (Derek)
Group: Is there a way to have perl generate packets or simulate a routing node to inject routes and simulate route flapping? Those are actually 2 scenarios. If you have examples that would be great also. 1) Generate TCP traffic. 2) Generate Routing protocol traffic Thanks -DW

RE: looping issue

2002-08-26 Thread Winchester, Derek S (Derek)
(config-vrouter-If-logIf)# ip address 10.51.51.1 netma sk 255.255.255.0 , Status=Passed 08/26/2002 00:35:12 admin/1 Support47(config-vrouter-If)# interface internal-atm-pvc 1/101 -Original Message- From: Hanson, Rob [mailto:[EMAIL PROTECTED]] Sent: Friday, August 23, 2002 5:05 PM To: &

logging data to text file

2002-09-12 Thread Winchester, Derek S (Derek)
I have composed this perl script and I would like the results from each command to append a log file. Is there a way I can do this? I have seen several examples but none of them looks as if it would achieve what I am trying to do here. Any help would be appreciated. #!/usr/bin/perl -w # file:

RE: logging data to text file help!!

2002-09-12 Thread Winchester, Derek S (Derek)
-Original Message- From: Winchester, Derek S (Derek) [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 12, 2002 12:22 PM To: [EMAIL PROTECTED] Subject: logging data to text file I have composed this perl script and I would like the results from each command to append a log file. Is

Net::Snmp example help

2002-05-02 Thread Winchester, Derek S (Derek)
-ALL I am actually new (couple of months) to Perl and find it difficult to edit this example of a Net::Snmp script for snmpwalk. The desired result is to have the script do a walk and print to either the console or log file. When I run it I dont know why or if the script is actually running the

RE: Digest version please

2001-04-19 Thread Derek Brinson
here here >>> "Jackson, William" <[EMAIL PROTECTED]> 04/19/01 03:23PM >>> I second Dave's request Thanks, Bill -Original Message- From: David Gilden [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 19, 2001 2:55 PM To: [EMAIL PROTECTED] Subject: Digest version please Can we get a di

Re: Telnet

2001-06-15 Thread Derek Harding
> > > I've seen lots of references to telnet, but I can't find an explanation > > of what it actually is. Is it similar to FTP? -- Best wishes, Derek Harding, (BA MIAP) ICT & Network Manager [EMAIL PROTECTED]

Output PERL to E-mail

2003-01-02 Thread Derek Brinson
NCCU Campus Durham, NC 27707Tele: (919) 530-7151 Fax: 530-5097 BEGIN:VCARD VERSION:2.1 X-GWTYPE:USER FN:Brinson, Derek TEL;WORK:7151 ORG:;ITS EMAIL;WORK;PREF;NGW:[EMAIL PROTECTED] N:Brinson;Derek END:VCARD -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Regular Expressions http error code

2003-03-12 Thread Romeyn, Derek
I need the three digits that are located on each line between 'HTTP/\d.\d" ' and another ' ' but not sure how to do that. Thanks much, Derek -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Regular Expressions http error code

2003-03-12 Thread Romeyn, Derek
hat $code would equal whatever was in the parentheses. Am I still not getting this? -Original Message- From: George P. [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 12, 2003 9:48 AM To: Romeyn, Derek Cc: '[EMAIL PROTECTED]' Subject: Re: Regular Expressions http error co

RE: Regular Expressions http error code

2003-03-12 Thread Romeyn, Derek
($timestamp, $msg) = split(/\t/); if (!$code) { print "NEXT\n"; next; } print "$code\t$msg\n"; $code = 0; } I did manage to get a version of George's to work. Still interested in trying all v

FW: Binary file conversion

2003-06-24 Thread Derek Byrne
Sorry John, wasn't watching where I was sending the reply... -Original Message- From: Derek Byrne Sent: 24 June 2003 21:40 To: 'John W. Krahn' Subject: RE: Binary file conversion best thing is to try opening them with notepad (if you got windows 9x/NT). dat files a

RE: Array Question

2003-06-25 Thread Derek Byrne
Hi Anthony, grabbed this from O'Reilly's Learning Perl : @rocks = qw/ bedrock slate lava /; foreach $rock (@rocks) { $rock = "\t$rock"; # put a tab in front of each element of @rocks $rock .= "\n"; # put a newline on the end of each } print "The rocks are:\n", @r

RE: Mastering "Learning Perl on Win 32 Systems"

2003-06-25 Thread Derek Byrne
What kind of error messages are you getting. Running Win2k over here. Can you give an example of a script which doesn't work? -Original Message- From: Anthony Beaman [mailto:[EMAIL PROTECTED] Sent: 25 June 2003 13:46 To: Kipp, James; [EMAIL PROTECTED] Subject: RE: Mastering "Learning Perl

RE: Array Question

2003-06-25 Thread Derek Byrne
Quick question, is there another way of ending the input of information into an array? Didn't know that CTRL-Z had to be used to terminate the input from the user before the rest of the prog would work. :o) like, for example, is there a way of limiting the size of the array to only 1 or 2 entries

RE: Array Question

2003-06-25 Thread Derek Byrne
Try This Then : --START-- print "Name your friends: "; $friends = ; #chomp($friends); @names = split(/ +/, ); print "I know $names[0].\n"; --END-- I get the following result (which is slightly better) --START-- C:\SCRIPTS\test>perl names4.pl Name your friends: Der

RE: Regex problem

2003-06-25 Thread Derek Byrne
Newbie answer here - if you change the line my $string = 'I love c++'; to be my $string = 'I love c\++'; it runs, but, you also get this output : C:\SCRIPTS\test>perl lovec.pl some compare string does not contain I love c\++ DerekB -Original Message- From: John W. Krahn [mailto:[EMA

Re : Compilation Errors

2003-06-26 Thread Derek Byrne
Hi All, Reading through Learning Perl (3rd Ed), and messing around with Binary Assignment Operators (2.5.3). Code is as follows : #!perl -w $fred = 4; print "Fred is now : $fred \n"; $fred += 4; print "Add 4 to Fred : $fred \n"; $fred *= 2; print "Multiply by 2 : $fred \n"; $fred -= 6; print "

FW: Re : Compilation Errors

2003-06-26 Thread Derek Byrne
Just a note - running win2k and perl v5.8.0 (built for MSWin32-x86-multi-thread). -Original Message- From: Derek Byrne Sent: 27 June 2003 00:13 To: [EMAIL PROTECTED] Subject: Re : Compilation Errors Hi All, Reading through Learning Perl (3rd Ed), and messing around with Binary

RE: Re : Compilation Errors

2003-06-26 Thread Derek Byrne
Mark [mailto:[EMAIL PROTECTED] Sent: 27 June 2003 00:45 To: 'Derek Byrne'; '[EMAIL PROTECTED]' Subject: RE: Re : Compilation Errors > -Original Message- > From: Derek Byrne [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 26, 2003 4:15 PM > To: '[EMAIL PROTEC

RE: Re : Compilation Errors

2003-06-26 Thread Derek Byrne
print "Multiply by 2 : $fred \n"; $fred -= $Sub; print "Subtract 6 : $fred \n"; $fred /= $Div; print "Divide by 2 : $fred \n"; $fred .= $Append; print "Append 5 to Fred : $fred \n"; -Original Message- From: LoBue, Mark [mailto:[EMAIL PROTECTED] S

Migrating to Perl from Batch files

2003-06-30 Thread Derek Byrne
Hi, Learning Perl from scratch at the moment, but not sure how I can go about writing perl scripts in place of my existing batch scripts. Below, is a working batch file.. what modules etc would I have to download to get Perl to do the same thing? Running Win2k and Perl 5.8. Céad Mile Fáilt

Need to change details in a Microsoft Access Database file

2003-07-28 Thread Derek Byrne
Hi, I have a database file with multiple entries which is an output from a now extinct SQL database. I've edited it in the past using Access, but want to create a perl script which will allow me to change the values for this one file (which I can then send out to our remote computers). Curren

Re : Installing CPAN Perl Modules with Activestate Perl 5. v5.8

2003-08-28 Thread Derek Byrne
Hi, In the process of trying to get perl modules installed, I downloaded over 300 Activestate specific perl modules and they work fine (of the ones I've used). Now, I've read somewhere that the perl modules which are located on CPAN are not directly compatible with ActiveState's version of Perl

Recommendations?

2003-12-09 Thread Derek Brinson
Where might I find reference (conceptual) stuff about how to launch a JAVA app via CGI (or vice versa)? Still working it out, but it appears that I may need to get some CGI variables into a JAVA App. Surely this is too difficult to be encapsulated in a website or two? -d

RE: Crypt::GPG produces an empty cleartext file

2006-04-06 Thread Smith, Derek
about how to fix this? Any help is appreciated! richf -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

RE: Crypt::GPG produces an empty cleartext file

2006-04-06 Thread Smith, Derek
-Original Message- From: RICHARD FERNANDEZ [mailto:[EMAIL PROTECTED] Sent: Thursday, April 06, 2006 12:45 PM To: beginners@perl.org Subject: RE: Crypt::GPG produces an empty cleartext file What version of Crypt:GPG are u using? Derek Bellner Smith Unix Systems Engineer

RE: Crypt::GPG produces an empty cleartext file

2006-04-14 Thread Smith, Derek
decrypt > > clear.txt ) I get a good (readable) cleartext file. You probably need to use binmode on your filehandles. John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <

RE: Extracting a bit of a scalar variable

2006-04-21 Thread Smith, Derek
5 6 64 7128 8 9 10 11 12 13 14 15 So what does this output tell me in English, that the decimal number 200 is composed of ??? Derek Bellner Smith Unix Systems Engineer Cardinal Health Dublin, Ohio [EMAIL PROTECTED] Working together. For life.(sm) __

RE: Extracting a bit of a scalar variable

2006-04-21 Thread Smith, Derek
-Original Message- From: Smith, Derek Sent: Friday, April 21, 2006 10:22 AM To: Perl Beginners Subject: RE: Extracting a bit of a scalar variable Original Message- From: Dr.Ruud [mailto:[EMAIL PROTECTED] Sent: Friday, April 21, 2006 9:19 AM To: beginners@perl.org Subject: Re

RE: golf

2006-04-23 Thread Smith, Derek
-Original Message- From: John W. Krahn [mailto:[EMAIL PROTECTED] Sent: Friday, April 21, 2006 7:04 PM To: Perl Beginners Subject: Re: golf Chad Perrin wrote: > On Fri, Apr 21, 2006 at 12:48:51PM -0700, John W. Krahn wrote: >>print/.*/g,$"while<> > > Woah, that's pretty short. You can m

truncate

2006-04-23 Thread Smith, Derek
n" line but the above code removes all lines??? Any help? Thank you Derek Bellner Smith Unix Systems Engineer Cardinal Health Dublin, Ohio 614-757-5000 Main 614-757-8075 Direct 614-757-8120 Fax [EMAIL PROTECTED] Cardinal Health -- Working together. For life. (sm) _

RE: truncate

2006-04-23 Thread Smith, Derek
-Original Message- From: Mr. Shawn H. Corey [mailto:[EMAIL PROTECTED] Sent: Sunday, April 23, 2006 1:51 PM To: Perl Beginners Subject: Re: truncate On Sun, 2006-23-04 at 13:29 -0400, Smith, Derek wrote: > use strict; > > use warnings; > > > > my $file = qq(

has key/value pairs

2006-05-03 Thread Smith, Derek
close (LOG) || warn "unable to close $log $!"; _OUTPUT__ SAVECRASH=1:1 SAVECRASH_DIR=/var/adm/crash :1 Thank you Derek Cardinal Health -- Working together. For life. (sm) _ This message is for the design

RE: has key/value pairs

2006-05-03 Thread Smith, Derek
-Original Message- From: Charles K. Clarkson [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 03, 2006 4:10 PM To: 'Perl Beginners' Subject: RE: has key/value pairs Smith, Derek wrote: : I need to create a hash with a key/value pair as text:nontext : like so: : savecrash as the

RE: has key/value pairs

2006-05-03 Thread Smith, Derek
-Original Message- From: Charles K. Clarkson [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 03, 2006 5:41 PM To: 'Perl Beginners' Subject: RE: has key/value pairs Smith, Derek wrote: : Excellent... thank you. Before sending the email question, I : was trying to use split to

scalar on a populated hash.

2006-05-05 Thread Smith, Derek
ount here should be 4 Thank you Derek #!/usr/bin/perl ##-- INIT environment --## require 5.6.1; use strict; use warnings; use diagnostics; #use MIME::Lite; $ENV{"PATH"} = qq(/usr/sbin:/usr/bin:/usr/local/log); delete @ENV{qw (IFS CDPATH ENV KSH_ENV) }; my (%

RE: scalar on a populated hash. NEVER MIND

2006-05-05 Thread Smith, Derek
_ From: Smith, Derek Sent: Friday, May 05, 2006 11:28 AM To: 'Perl Beginners' Subject: scalar on a populated hash. I do not understand why scalar is returning me 2/8? Also isn't scalar %hashname the recommended way to get a count of the key or values in any hash? I t

using Perl grep to populate a scalar

2006-05-09 Thread Smith, Derek
relantionship. Thank you Derek Derek Bellner Smith Unix Systems Engineer Cardinal Health Dublin, Ohio 614-757-5000 Main 614-757-8075 Direct 614-757-8120 Fax [EMAIL PROTECTED] Cardinal Health -- Working together. For life. (sm

RE: using Perl grep to populate a scalar

2006-05-10 Thread Smith, Derek
-Original Message- From: Smith, Derek Sent: Tuesday, May 09, 2006 5:22 PM To: Perl Beginners Subject: using Perl grep to populate a scalar All, I am trying to populate a scalar (ideally a hash) using a Perl grep but it is not working. I even tried to use an array and no data was

RE: using Perl grep to populate a scalar

2006-05-10 Thread Smith, Derek
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Phoenix Sent: Wednesday, May 10, 2006 6:35 PM To: Smith, Derek Cc: Perl Beginners Subject: Re: using Perl grep to populate a scalar On 5/9/06, Smith, Derek <[EMAIL PROTECTED]> wrote: > if

hash assignments

2006-05-15 Thread Smith, Derek
} #%hash = (@mir,@mir2); #while (($key2,$value2) = each %hash) { # print "$key2\t:$value2"; #} print @mir; print "\nsecond array\n"; print @mir2; #($key1,$value1) = split/=/; #$cc{$key1}= $value1; Thanks Derek Derek Bellner Smi

RE: hash assignments

2006-05-15 Thread Smith, Derek
>On 5/15/06, Smith, Derek <[EMAIL PROTECTED]> wrote: > I tried an push @mir2 => (unless /lv\d+/i, `lvdisplay $lv`); in place of > the third push > > But that gave me an error: Uncaught exception from user code: > >syntax error at HPUX_verify_sys

RE: hash assignments

2006-05-16 Thread Smith, Derek
the > >substitution >succeeds, you will get the modified string. >Correct me if I'm wrong, but all of the expressions in the block have to >evaluate to true for grep to return the value when using the block form. >In the last one, you are carrying out the substitution on each e

hash assign not working

2006-05-16 Thread Smith, Derek
value2) = [ split ]; print "$key2\t:$value2"; } Derek Bellner Smith Unix Systems Engineer Cardinal Health Dublin, Ohio 614-757-5000 Main 614-757-8075 Direct 614-757-8120 Fax [EMAIL PROTECTED] Cardinal Health -- Working togethe

RE: hash assign not working

2006-05-16 Thread Smith, Derek
From: Wagner, David --- Senior Programmer Analyst --- WGO [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 16, 2006 2:06 PM To: Smith, Derek; beginners@perl.org Subject: RE: hash assign not working Smith, Derek wrote: > My hash creations are not working as I expected: %hash = ( @mir, >

RE: What are the problems with my CGI script

2006-06-06 Thread Smith, Derek
Drive-Status}], -linebreak=>'true', -attributes=>\my %attributes), $q->defaults(-name=>'Default'),$q->submit('form','Send Form' ); my $which_radio_button = $q->param('view') || q{};

install problems on HPUX 11.11

2006-06-12 Thread Smith, Derek
with the C/ANSI C product; ignored. (Bundled) cc: warning 480: The +Z option is available only with the C/ANSI C product; ignored. cpp: "/opt/perl/lib/5.8.2/PA-RISC1.1-thread-multi/CORE/perlio.h", line 108: erro r 4065: Recursion in macro "PerlIO". *** Error exit code 1 Stop.

module install on HPUX 11.11 ....any suggestions?

2006-06-13 Thread Smith, Derek
with the C/ANSI C product; ignored. (Bundled) cc: warning 480: The +Z option is available only with the C/ANSI C product; ignored. cpp: "/opt/perl/lib/5.8.2/PA-RISC1.1-thread-multi/CORE/perlio.h", line 108: erro r 4065: Recursion in macro "PerlIO". *** Error exit code 1

5.8.2 vs 5.6.1

2006-06-15 Thread Smith, Derek
will be used to mail alerts. Thank you Derek Derek Bellner Smith Unix Systems Engineer Cardinal Health Dublin, Ohio 614-757-5000 Main 614-757-8075 Direct 614-757-8120 Fax <mailto:[EMAIL PROTECTED]> Cardinal Health -- Working together. For lif

compilation of Devel-Size for DataDumper

2006-06-15 Thread Smith, Derek
How can I tell the HPUX 11.11 system to not use it default C compiler /usr/bin/cc but instead use gcc version 4.1.1? I manually edited the Makefile to point CC=/usr/local/bin/gcc but I get the errors below: Do I need an ANSI C compiler? Please advise! Thank you Derek As root

RE: compilation of Devel-Size for DataDumper

2006-06-15 Thread Smith, Derek
>-Original Message- >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom >Phoenix >Sent: Thursday, June 15, 2006 3:21 PM >To: Smith, Derek >Cc: beginners@perl.org >Subject: Re: compilation of Devel-Size for DataDumper >On 6/15/06, Smith, Derek &

uninitialized value error

2006-06-21 Thread Smith, Derek
    Here is my code as attached, but please excuse the Perl version….. 5.005_03 Thank you Derek     Derek Bellner Smith Unix Systems Engineer Cardinal Health Dublin, Ohio     _ This message is for the designated recipient only and m

RE: uninitialized value error

2006-06-21 Thread Smith, Derek
Have given it many attempts to fix….but now need help..   Derek Bellner Smith Unix Systems Engineer Cardinal Health Dublin, Ohio   From: Smith, Derek Sent: Wednesday, June 21, 2006 11:19 AM To: beginners@perl.org Subject: uninitialized value error   I am getting the

RE: uninitialized value error

2006-06-21 Thread Smith, Derek
-Original Message- From: Gary Stainburn [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 11:35 AM To: beginners@perl.org Subject: Re: uninitialized value error On Wednesday 21 June 2006 16:23, Smith, Derek wrote: > I am getting the following error yet the script is doing wha

RE: uninitialized value error

2006-06-21 Thread Smith, Derek
-Original Message- From: Charles K. Clarkson [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 11:53 AM To: beginners@perl.org Subject: RE: uninitialized value error Smith, Derek wrote: : I am getting the following error yet the script is doing what : I need it to do restart a

RE: uninitialized value error

2006-06-21 Thread Smith, Derek
-Original Message- From: Beginner [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 12:16 PM To: beginners@perl.org Subject: RE: uninitialized value error On 21 Jun 2006 at 17:08, Beginner wrote: > for (;;) { > print SDTERR "PS=$_\n"; > push @arry, (spl

RE: eval problem

2006-06-27 Thread Smith, Derek
al similar to $ENV{"PATH"} = qq(/opt/SUNWsamfs/sbin:/usr/bin); Thank you Derek _ This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error,

RE: What is the function of BEGIN in perl

2006-07-05 Thread Smith, Derek
-Original Message- From: Mr. Shawn H. Corey [mailto:[EMAIL PROTECTED] Sent: Monday, May 01, 2006 7:36 PM To: chen li Cc: beginners@perl.org Subject: Re: What is the function of BEGIN in perl On Mon, 2006-01-05 at 15:32 -0700, chen li wrote: > Dear all, > > Recently I read some source c

RE: What is the function of BEGIN in perl

2006-07-05 Thread Smith, Derek
-Original Message- From: Mr. Shawn H. Corey [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 05, 2006 1:21 PM To: Perl Beginners Subject: Re: What is the function of BEGIN in perl Smith, Derek wrote: > Doesn't the BEGIN and INIT constructs provide the same behavior? No. From

inherited perl program

2006-07-07 Thread Smith, Derek
type |") || die ("open $formatscript failed: $!");   while ( )   {    ($name,$oid) = split;    $oid =~ s/^\.//;    push @$node_type, "$name";    $oid{$name} = "$oid";   }   close TEMP;  }   }  

RE: inherited perl program

2006-07-07 Thread Smith, Derek
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Anthony Ettinger Sent: Friday, July 07, 2006 1:27 PM To: Smith, Derek Subject: Re: inherited perl program On 7/7/06, Smith, Derek <[EMAIL PROTECTED]> wrote: > > > > > I have inherite

RE: Regexp help please

2006-07-13 Thread Smith, Derek
-Original Message- From: Dr.Ruud [mailto:[EMAIL PROTECTED] Sent: Thursday, July 13, 2006 5:24 PM To: beginners@perl.org Subject: Re: Regexp help please "Dr.Ruud" schreef: > Slight revision, that fails on the last line: More assuming revision: #!/usr/bin/perl use warnings ; use str

Creating an array of hashes from a database while preserving order

2006-07-20 Thread Derek Ash
name", \%attr, $value),); #Display results return $template->output; } Thanks in advanceI am a Perl newbie, derek Derek Ash Application Programmer II University of Illinois College of Medicine at Peoria One Illini Drive, Box 1649 Peoria, Illinois 61656-1649 -- To unsubsc

RE: check existence of element in a list

2006-07-21 Thread Smith, Derek
-Original Message- From: joseph [mailto:[EMAIL PROTECTED] Sent: Thursday, July 20, 2006 6:45 PM To: beginners@perl.org Subject: Re: check existence of element in a list > > s/\s+$// foreach @pclist; > s/\s+$// foreach @smsclient; > > instead of using chomp(). If this also fails, the

RE: Regex find and replace - delete line

2006-07-24 Thread Smith, Derek
{ > splice @file, $i, 1 if $file[$i] =~ /foo/; Yes it should, sorry about that mistake. John -- use Perl; program fulfillment -- I tested this code #!/usr/bin/perl use strict; use warnings; my @file = (); @file = qq(foo, derek, smith, bar); for my $i ( reverse 0 .. $#file ) { splice @

RE: Regex find and replace - delete line

2006-07-24 Thread Smith, Derek
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Ahhh yes...thank you for the pointing out the oversights => qw instead of qq and removing the commas. ___

RE: perl script calls batch file

2006-08-03 Thread Smith, Derek
-Original Message- From: Shourya Sengupta [mailto:[EMAIL PROTECTED] Sent: Thursday, August 03, 2006 2:15 PM To: beginners@perl.org Subject: perl script calls batch file Hi, My perl program calls a batch file on a remote machine. Now my question is how to return a value from that batch s

RE: string to perl

2006-08-07 Thread Smith, Derek
-Original Message- From: Timothy Johnson [mailto:[EMAIL PROTECTED] Sent: Monday, August 07, 2006 9:58 AM To: Ryan Perry; Perl Beginners Subject: RE: string to perl Check out the documentation on the eval function perldoc -f eval -Original Message- From: Ryan Perry [mailto:[E

RE: Re: Re: How to sort an array which contains a value several times ?

2006-08-15 Thread Smith, Derek
Since grep only cares if the expression evaluates true or false, the $_ in second version is superfluous, but it may be the easiest to read and understand. If you want to find unique values and keep a count of how many times something has been seen, then you can do something like: $seen{$_}++

RE: match an array element

2006-08-16 Thread Smith, Derek
-Original Message- From: Adriano Allora [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 16, 2006 1:21 PM To: beginners@perl.org Subject: match an array element hi all, I need to match any array element in a list of files. More precisely I'd to extract the $. for each match recording

recusrive listing

2006-08-18 Thread Smith, Derek
ntents = @$io; # Directory as an array @contents = values %$io;# Directory as a hash push @contents, $subdir # One at a time while $subdir = $io->next; thank you derek Derek Bellner Smith Unix Systems Engineer

RE: recusrive listing

2006-08-18 Thread Smith, Derek
-Original Message- From: Ricardo SIGNES [mailto:[EMAIL PROTECTED] Sent: Friday, August 18, 2006 8:58 AM To: beginners@perl.org Subject: Re: recusrive listing * "Smith, Derek" <[EMAIL PROTECTED]> [2006-08-17T10:52:16] > What module would be ideal for getting a recurs

IO::All and Logfile::Rotate issues

2006-08-21 Thread Smith, Derek
h @NBlogs1, grep { $_ ne "." and $_ ne ".." and -f "$oneweekdir/$_" } readdir(DIR1); unless (! @NBlogs1) { foreach my $nblogs (@NBlogs1) { logroll($nblogs); } } ##-- End unless --## } ##-- End -d if --## else {

filecopy

2006-08-21 Thread Smith, Derek
" ) { copy ("$log", "/tmp/") or die $!; } Derek Bellner Smith Unix Systems Engineer Cardinal Health Dublin, Ohio <mailto:[EMAIL PROTECTED]> _ This message is for the designated recipient only and may

test message

2006-12-13 Thread derek smith
This is a test... : ) - Have a burning question? Go to Yahoo! Answers and get answers from real people who know.

only reading every other directory

2005-09-24 Thread Derek Lamb
irectories, but it only finds the dat file in directories 1,3, and 5, not 2 and 4. The warning doesn't really tell me anything that I didn't already know. To make sure I am not crazy, I do: $ ls Good/0?/*.dat Good/01/01.dat Good/02/02.dat Good/03/03.dat Good/04/04.dat Good/05/0

RE: File Copy

2006-08-22 Thread Derek B. Smith
http://www.rfc-ignorant.org/' Smith, Derek wrote: > Why doesn't a copy work on each array element yet a glob does? I'm assuming you eman copy() from File::Copy? because copy()'s source doesn't do that I imagine. Is there documentation for copy() that seems to indic

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= (); %un

hash look up table for rolling logs

2006-08-25 Thread Derek B. Smith
##-- Treat each sequence of non-whitespace as a word --## my @words = split /\s+/, $words; ##-- Translate each word to its appropriate number --## my $num = q{}; foreach my $word (@words) { my $digit = $subdir_for{lc $word}; if (defined $digit) {

hash lookup table

2006-08-28 Thread Derek B. Smith
2, ); sub words_to_num { my $words = @_; ##-- Treat each sequence of \S+ as a word --## my @words = split /\s+/, $words; ##-- Translate each word to its appropriate number --## my $num = q{}; foreach my $word (@words) { my $digi

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

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: hash lookup table

2006-08-29 Thread Derek B. Smith
nv/netbackup/logs/bpdbm/log.082906 /usr/openv/logs/old/13 '; word variable assgn:$VAR1 = 'bptm'; number assgn from hash: $VAR1 = 39; word output:$VAR1 = 'bptm'; $VAR2 = ' '; number output: $VAR1 = 39; $VAR2 = ' '; copy call: $VAR1 = 'cp /usr/open

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: 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

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

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: 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

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

Archive::Zip and hash issues

2006-09-14 Thread Derek B. Smith
ip $oldir/$word/*) ); #print "archive zip call:\t", zipit("$oldir/$word/*"); print "archive zip call:\t", zipit($logs1); } } } thank you derek __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection

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'=&

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: 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--

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: [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
y writing code for the projects completion such as Jbilling? Jbilling is an open source billing project built on J2EE where people register and reserve assigments from a general list. Each assigment contains instructions/pseudocode/business process definitions to help so the developer wi

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-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 > > t

  1   2   >