RE: if else elsif

2011-03-17 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Chris Stinemetz [mailto:cstinem...@cricketcommunications.com] Sent: Thursday, March 17, 2011 14:16 To: beginners Subject: if else elsif I am trying to return new values based on if else. I understand the idea of using if else, but I am not sure I have placed in

RE: Testing File Contents

2011-03-02 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Matt [mailto:lm7...@gmail.com] Sent: Wednesday, March 02, 2011 11:25 To: beginners@perl.org Subject: Re: Testing File Contents # Untested use strict; use warnings; open my $fh, '', my_file; while($fh){     if ($_ !~ /my_string/) {         # Do something   

RE: Getting LineFeed for Excel within q quoted field

2011-01-07 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: John Delacour [mailto:johndelac...@gmail.com] Sent: Wednesday, January 05, 2011 18:32 To: Perl Beginners Subject: Re: Getting LineFeed for Excel within q quoted field At 17:56 -0600 04/01/2011, Wagner, David wrote: I am generating an CSV and want a couple of

RE: Getting LineFeed for Excel within q quoted field

2011-01-07 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: John Delacour [mailto:johndelac...@gmail.com] Sent: Thursday, January 06, 2011 11:33 To: beginners@perl.org Subject: RE: Getting LineFeed for Excel within q quoted field At 11:55 -0600 06/01/2011, David Waner wrote: From: John Delacour

RE: Getting LineFeed for Excel within q quoted field

2011-01-07 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Rob Dixon [mailto:rob.di...@gmx.com] Sent: Thursday, January 06, 2011 21:49 To: David Wagner Cc: beginners@perl.org Subject: Re: Getting LineFeed for Excel within q quoted field At 11:55 -0600 06/01/2011, David Wagner wrote: For something that should have been

RE: Getting LineFeed for Excel within q quoted field

2011-01-06 Thread Wagner, David --- Senior Programmer Analyst --- CFS
Original Message- From: Parag Kalra [mailto:paragka...@gmail.com] Sent: Wednesday, January 05, 2011 16:42 To: Wagner, David --- Senior Programmer Analyst --- CFS Cc: Perl Beginners Subject: Re: Getting LineFeed for Excel within q quoted field Ok. May be I need to understand your scenario

RE: Getting LineFeed for Excel within q quoted field

2011-01-06 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Parag Kalra [mailto:paragka...@gmail.com] Sent: Wednesday, January 05, 2011 12:13 To: Wagner, David --- Senior Programmer Analyst --- CFS Cc: Perl Beginners Subject: Re: Getting LineFeed for Excel within q quoted field It may have to do something how you

Getting LineFeed for Excel within q quoted field

2011-01-05 Thread Wagner, David --- Senior Programmer Analyst --- CFS
I am generating an CSV and want a couple of fields to have soft returns in them. I went into Excel and added a couple of soft returns to a couple of different fields and then saved the modified file back to a CSV. I opened in a editor and reviewed what was there. What I saw was:

RE: glob files and subdirectories

2010-12-08 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Noah [mailto:noah-l...@enabled.com] Sent: Wednesday, December 08, 2010 12:42 To: Perl Beginners Subject: glob files and subdirectories Hi there, what is the easiest way to get all the filenames like *html in the root directory and all subdirectories? The glob

RE: Word boundaries

2010-07-21 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: John W. Krahn [mailto:jwkr...@shaw.ca] Sent: Tuesday, July 20, 2010 15:06 To: Perl Beginners Subject: Re: Word boundaries Rob Dixon wrote: On 20/07/2010 16:22, Chandan Kumar wrote: Small confusion about word boundaries. word boundaries matches anything between

RE: XML Parser Error

2010-04-16 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Open Source [mailto:open.sou...@gmx.com] Sent: Thursday, April 15, 2010 11:41 To: Beginners, Perl Subject: XML Parser Error I'm getting this error: Undefined subroutine XML::Simple::XMLin called at ./sample.pl line 3. Here's my code and input file: use

RE: being smart about script structure

2009-12-12 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Bryan R Harris [mailto:bryan_r_har...@raytheon.com] Sent: Friday, December 11, 2009 15:10 To: Beginners Perl Subject: Re: being smart about script structure Seems like a waste to do step 2 in a subroutine since we only do it once, but it does

RE: printf

2009-10-28 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Aimee Cardenas [mailto:aim...@sfbrgenetics.org] Sent: Tuesday, October 27, 2009 15:53 To: Perl Beginners Subject: printf Hi, All! I need to fix the width of some strings padding with leading spaces if necessary. I wanted to use printf but I don't

Building a fmt line for printf with a carriage return

2009-10-23 Thread Wagner, David --- Senior Programmer Analyst --- CFS
I thought I had done this before, but I guess not. I build a formt line for printf like: q[%-3s%-4s%5s%6s]; But I want to insert a carriage return after say %-4s( I have a nubmer of fields and depending on the size, it is not a constant after column 2, but could

RE: match pattern

2009-09-19 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: raphael() [mailto:raphael.j...@gmail.com] Sent: Friday, September 18, 2009 10:40 To: Perl BEGIN Subject: match pattern Hi How do I pick out matching words if there are more than one on the same line? Example INFILE.TXT www.site01.com

RE: Printing a hash of hashes of arrays

2009-08-28 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Ian [mailto:pcs...@gmail.com] Sent: Thursday, August 27, 2009 11:43 To: beginners@perl.org Subject: Printing a hash of hashes of arrays Pure beginners question. I'm creating a hash of arrays like this : $ihash{$3}{$1} = [...@itab]; For now I was

RE: one liner in Windows to replace string

2009-08-25 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Tony Esposito [mailto:tony1234567...@yahoo.co.uk] Sent: Monday, August 24, 2009 10:46 To: Beginners Perl Cc: tony1234567...@yahoo.co.uk Subject: one liner in Windows to replace string perl -p -i.bak -e 's/CONSTANT/VARIABLE/' C:\test.txt I

RE: one liner in Windows to replace string

2009-08-25 Thread Wagner, David --- Senior Programmer Analyst --- CFS
From: Tony Esposito [mailto:tony1234567...@yahoo.co.uk] Sent: Monday, August 24, 2009 13:20 To: Shawn H. Corey; Wagner, David --- Senior Programmer Analyst --- CFS Cc: Beginners Perl Subject: Re: one liner in Windows

RE: one liner in Windows to replace string

2009-08-25 Thread Wagner, David --- Senior Programmer Analyst --- CFS
From: Tony Esposito [mailto:tony1234567...@yahoo.co.uk] Sent: Monday, August 24, 2009 14:09 To: Shawn H. Corey Cc: Wagner, David --- Senior Programmer Analyst --- CFS; Beginners Perl Subject: Re: one liner in Windows

RE: one liner in Windows to replace string

2009-08-25 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Shawn H. Corey [mailto:shawnhco...@gmail.com] Sent: Monday, August 24, 2009 11:00 To: Tony Esposito Cc: Beginners Perl Subject: Re: one liner in Windows to replace string Tony Esposito wrote: perl -p -i.bak -e 's/CONSTANT/VARIABLE/' C:\test.txt

RE: one liner in Windows to replace string

2009-08-25 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Shawn H. Corey [mailto:shawnhco...@gmail.com] Sent: Monday, August 24, 2009 11:57 To: Wagner, David --- Senior Programmer Analyst --- CFS Cc: Tony Esposito; Beginners Perl Subject: Re: one liner in Windows to replace string Wagner, David --- Senior

RE: script to compare dates

2009-08-18 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Mihir Kamdar [mailto:kamdarmihi...@gmail.com] Sent: Tuesday, August 18, 2009 08:55 To: Steve Bertrand Cc: beginners Subject: Re: script to compare dates I dont have Datetime module installed. Is there a way without using DateTime?? You don't

RE: Automating the resetting of Power Options

2009-08-06 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Kevin Safford [mailto:saffo...@uk.ibm.com] Sent: Monday, August 03, 2009 04:37 To: beginners@perl.org Subject: Re: Automating the resetting of Power Options Wagner, David --- Senior Programmer Analyst --- CFS wrote: So does anyone have a Perl script

Automating the resetting of Power Options

2009-07-28 Thread Wagner, David --- Senior Programmer Analyst --- CFS
Whenever I have to reboot ( Windows XP Sp2 ), which I try to keep to a minimum, it resets the power options. I have no control of that, but I can also go in a set to what I want it to be. Unfortunately I get side tracked at times after a re-boot and next thing I am at home and when I

RE: Having problems getting data back to STDOUT once I assign it to a file

2009-07-22 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Patrick K Christopher TANAGER [mailto:pchristop...@tanagerinc.com] Sent: Tuesday, July 21, 2009 11:04 To: Wagner, David --- Senior Programmer Analyst --- CFS; Tony Esposito; beginners@perl.org Subject: RE: Having problems getting data back to STDOUT once

RE: Reading a list of numbers into an array

2009-07-22 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Emanuele Osimo [mailto:e.os...@gmail.com] Sent: Wednesday, July 22, 2009 15:47 To: beginners perl ml Subject: Reading a list of numbers into an array Hello there, I'd like to read a file thet is a list of numbers like: 3084 4855 2904 making each line

Having problems getting data back to STDOUT once I assign it to a file

2009-07-21 Thread Wagner, David --- Senior Programmer Analyst --- CFS
I am done processing and I want to place the final output line also on the screen. Here is what I have: if ( $GlblInfo{audit} ) { printf \n\n*Should be last line in the audittrail file...*\n\n; close(STDOUT); close(STDERR); open(STDOUT , '')

RE: Having problems getting data back to STDOUT once I assign it to a file

2009-07-21 Thread Wagner, David --- Senior Programmer Analyst --- CFS
wrote: Shawn H. Corey wrote: Wagner, David --- Senior Programmer Analyst --- CFS wrote:     I am done processing and I want to place the final output line also on the screen. Here is what I have:     if ( $GlblInfo{audit} ) {         printf \n\n*Should be last line in the audittrail

RE: While issues

2009-07-16 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Patrick K Christopher TANAGER [mailto:pchristop...@tanagerinc.com] Sent: Thursday, July 16, 2009 11:39 To: beginners@perl.org Subject: While issues I can't seem to find this oddness in this script. #! /usr/bin/perl You should use strict and

RE: word substitute with character count.

2009-06-19 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Nisse Tuta [mailto:nisset...@gmail.com] Sent: Thursday, June 18, 2009 15:12 To: beginners@perl.org Subject: word substitute with character count. Hi all, I'm having a problem solving this one. I need to replace/substitute a word in a text file. The

RE: Please, I need help!!!

2009-06-13 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Phillip [mailto:fibbe...@gmx.net] Sent: Thursday, June 11, 2009 12:00 To: beginners@perl.org Subject: Please, I need help!!! Hallo @ all, i am new in this domain(perlscript) and i have a question.i have a array,i sort it,i get the last element of the

RE: split() does not work with all characters

2009-06-03 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Tony Esposito [mailto:tony1234567...@yahoo.co.uk] Sent: Tuesday, June 02, 2009 15:29 To: Beginners Perl Subject: split() does not work with all characters When trying to use split() where the delimiter is passed from the command-line ( as seen in stub

RE: skipping a repeated header

2009-05-27 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Kirk Wythers [mailto:kwyth...@umn.edu] Sent: Wednesday, May 27, 2009 09:31 To: beginners@perl.org Subject: skipping a repeated header I have a large datafile that I am trying to read into a postgresql database. I think I have the db_connect stuff down,

RE: skipping a repeated header

2009-05-27 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Kirk Wythers [mailto:kwyth...@umn.edu] Sent: Wednesday, May 27, 2009 10:16 To: Wagner, David --- Senior Programmer Analyst --- CFS Cc: beginners@perl.org Subject: Re: skipping a repeated header Thanks David. I didn't include my attempts because

RE: deleting subdirectories only in Win32

2009-05-15 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Tony Esposito [mailto:tony1234567...@yahoo.co.uk] Sent: Thursday, May 14, 2009 12:02 To: beginners@perl.org Subject: Fw: deleting subdirectories only in Win32 It appears that, after doing more research, the keep_root variable does not keep the \data

RE: Re: Perl code for comparing two files

2009-05-09 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: news [mailto:n...@ger.gmane.org] On Behalf Of Richard Loveland Sent: Friday, May 08, 2009 11:59 To: beginners@perl.org Subject: Re: Perl code for comparing two files -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mr. Adhikary, The following will take

RE: Perl code for comparing two files

2009-05-09 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Anirban Adhikary [mailto:anirban.adhik...@gmail.com] Sent: Monday, May 04, 2009 06:40 To: beginners@perl.org Subject: Perl code for comparing two files Hi List I am writing a perl code which will takes 2 more files as argument. Then It will check the

How to Extract to a flat file thru Excel an Access DB file

2009-05-09 Thread Wagner, David --- Senior Programmer Analyst --- CFS
I have an Excel file that I am copying from a Windows server to Linux box(initially). I then extract each worksheet to their own csv. Within the Excel is detail that is contained within a Access DB. I am getting the necessary worksheets out ok, but am unsure how or if one can extract to

RE: String manipulation question

2009-04-22 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Grant [mailto:emailgr...@gmail.com] Sent: Tuesday, April 21, 2009 09:58 To: Perl Beginners List Subject: String manipulation question I'd like to take a string and manipulate it in a few ways. If the string is 34 characters or less, I'd like to append a

RE: String manipulation question

2009-04-22 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Grant [mailto:emailgr...@gmail.com] Sent: Tuesday, April 21, 2009 11:47 To: Perl Beginners List Subject: Re: String manipulation question I'd like to take a string and manipulate it in a few ways. If the string is 34 characters or less, I'd like to

RE: String manipulation question

2009-04-22 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Grant [mailto:emailgr...@gmail.com] Sent: Tuesday, April 21, 2009 12:16 To: Perl Beginners List Subject: Re: String manipulation question Thanks guys.  With some help I've come up with this: $string = 'abc def ghi jkl mno pqr stu vwx yz';

RE: String manipulation question

2009-04-22 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Grant [mailto:emailgr...@gmail.com] Sent: Tuesday, April 21, 2009 12:43 To: Perl Beginners List Subject: Re: String manipulation question Thanks guys.  With some help I've come up with this: $string = 'abc def ghi jkl mno pqr stu vwx yz';

RE: String manipulation question

2009-04-22 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Grant [mailto:emailgr...@gmail.com] Sent: Tuesday, April 21, 2009 12:55 To: Perl Beginners List Subject: Re: String manipulation question Thanks guys.  With some help I've come up with this: $string = 'abc def ghi jkl mno pqr stu vwx yz';

Generating emails for BlackBerry

2009-04-21 Thread Wagner, David --- Senior Programmer Analyst --- CFS
I have a number of emails I do for upper management, but the majority of them travel and live off their BlackBerry. I am attempting to think out how to present the data to them so that it lines up ( or at least attempts to line up) for easier reading. I would still send the original

RE: help needed to get over endless loop

2009-04-17 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Brian [mailto:brian5432...@yahoo.co.uk] Sent: Friday, April 17, 2009 11:03 To: Perl Beginners Subject: help needed to get over endless loop Hi I had this semi-working, changed something and can't remember where I went right, so would appreciate some

RE: Looking for a quick, easy way to time system process to the sub-second

2009-04-10 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Dan Huston [mailto:dan.hus...@domail.maricopa.edu] Sent: Friday, April 10, 2009 11:24 To: beginners@perl.org Subject: Looking for a quick, easy way to time system process to the sub-second Greetings All: I have a script that I am using to run a series

RE: Replace string with list of strings via character changes

2009-04-10 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Kelly Jones [mailto:kelly.terry.jo...@gmail.com] Sent: Friday, April 10, 2009 13:33 To: beginners@perl.org Subject: Replace string with list of strings via character changes I want to replace all the o's in a string with x's or y's and all the a's in a

Converting an XML doc ( xls format ) to CSV

2009-04-01 Thread Wagner, David --- Senior Programmer Analyst --- CFS
I have two files which are xml based and double clickable into Excel. I would like to get the data into a CSV, but when I try to read using use Spreadsheet::ParseExcel; I get no ouput and no errors. I looked at XML::Simple and followed the example they had but it generates

RE: Network Printing using a Perl Script

2009-03-12 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Aglipay, Recelyn [mailto:recelyn.agli...@ehmc.com] Sent: Thursday, March 12, 2009 07:19 To: Wagner, David --- Senior Programmer Analyst --- CFS; beginners@perl.org Subject: RE: Network Printing using a Perl Script Hi Dave, I'm using a third party

RE: Network Printing using a Perl Script

2009-03-11 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Aglipay, Recelyn [mailto:recelyn.agli...@ehmc.com] Sent: Wednesday, March 11, 2009 15:35 To: beginners@perl.org Subject: Network Printing using a Perl Script Hello everyone, I'm a beginner and having some issues with a Perl Script I had written

RE: Printing directory sizes

2009-03-04 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: lauri.nikki...@gmail.com [mailto:lauri.nikki...@gmail.com] On Behalf Of Lauri Nikkinen Sent: Tuesday, March 03, 2009 12:10 To: Wagner, David --- Senior Programmer Analyst --- CFS Cc: Perl Beginners Subject: Re: Printing directory sizes Thanks, how can I

RE: Printing directory sizes

2009-03-04 Thread Wagner, David --- Senior Programmer Analyst --- CFS
From: lauri.nikki...@gmail.com [mailto:lauri.nikki...@gmail.com] On Behalf Of Lauri Nikkinen Sent: Tuesday, March 03, 2009 13:00 To: Chas. Owens Cc: Wagner, David --- Senior Programmer Analyst --- CFS; Perl Beginners

RE: Printing directory sizes

2009-03-04 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: lauri.nikki...@gmail.com [mailto:lauri.nikki...@gmail.com] On Behalf Of Lauri Nikkinen Sent: Tuesday, March 03, 2009 11:38 To: Perl Beginners Subject: Printing directory sizes Hi, I'm trying to print directory sizes using script from

RE: calling a program from a perl script and redirecting to output to a file

2009-02-19 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Thomas Evangelidis [mailto:teva...@gmail.com] Sent: Thursday, February 19, 2009 09:12 To: Wagner, David --- Senior Programmer Analyst --- CFS Cc: beginners@perl.org Subject: Re: calling a program from a perl script and redirecting to output to a file

RE: calling a program from a perl script and redirecting to output to a file

2009-02-19 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Thomas Evangelidis [mailto:teva...@gmail.com] Sent: Thursday, February 19, 2009 08:27 To: beginners@perl.org Subject: calling a program from a perl script and redirecting to output to a file Dear Perl programmers, I want to run a program from a perl

Delay in sending email via Perl

2009-02-05 Thread Wagner, David --- Senior Programmer Analyst --- CFS
Within Outlook, one can create an email and then not send it until a date and time has been met. Can this also be done via Perl and either Sendmail or Sender? I looked at the doc and did not see anything about delay of sending. Found delay on retires, etc., but nothing on delay in

RE: Loading results of pattern match into an array - help please

2009-01-24 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: jeffqt...@gmail.com [mailto:jeffqt...@gmail.com] Sent: Friday, January 23, 2009 12:58 To: beginners@perl.org Subject: Loading results of pattern match into an array - help please I am trying to split a very long fixed lenght record into its constituents,