perl msi version 5.0.0

2006-03-23 Thread Bowen, Bruce
Does anyone still have access to this version? I have thousands of system with hundreds of scripts already installed and the version on the development side is 5.0.1 and there are differences, however slight. Thanks, Bruce Bowen 401-568-8315

regular expressions

2006-04-21 Thread Bowen, Bruce
In perldoc under this topic s is listed as "Treat string as a single line" and m as Treat string as multiples lines". If I have text that has varying spaces at the begging of each line, and I use $string =~ s/^\s+//; It will remove the spaces from in from of the first line but not any other l

A newbe has a question relating to XML::Simple

2005-09-02 Thread Bowen, Bruce
The xml file is 1 Column 1 Column 2 Column 3 Column 4 2 Column 1 Column 2 Column 3 Column 4 And the Code so far is use strict; use warnings; use XML::Simple; my $data = XMLin('data.xml', forcearray=>1); for my $data (@{$data->{data}}) { foreach (qw(Field4)) { print $

shared library of variables?

2005-09-04 Thread Bowen, Bruce
I have a program that is monitoring communications into a PC, and based on the message format will trigger one of multiple perl files. Most of these files use the same variable name and my question today is, is there a way of establishing a common library file containing all of the variables so th

5.6 versus 5.8

2005-09-06 Thread Bowen, Bruce
In the file Brucesubs2.pm: #!/usr/bin/perl # somesubs.pm package Brucesubs2; use strict; $Brucesubs2::scr = "123"; $Brucesubs2::lang = "000"; In the file Brucesub2.pl #!/usr/bin/perl # srandcall.pl use warnings; use strict; use Brucesubs2; print $Brucesubs2::lang, " and ", $Brucesubs2::scr

finding the first non digit character in a string

2005-10-28 Thread Bowen, Bruce
I see where you can test for a match in a string of data using the If ( ) statement, but can you use it with an 'index' statement? The data may look like this: $DD = "5000|SIHHTEXT" I've tried $d = index($DD, m/[^\d]/); $d = index($DD, /[^\d]/); $d = index($DD, [^\d]); n

removing line feeds

2006-01-21 Thread Bowen, Bruce
I have files with this format text text |fs text text text |fs The goal here is to make this data into a flat file of continuous text (including the |fs).texttext|fstexttexttext|fs I know how to get rid of the carriage returns using s/\n//g, but haven't had any luck in finding the way to

FW: removing line feeds

2006-01-21 Thread Bowen, Bruce
On Jan 21, 2006, at 17:28, Bowen, Bruce wrote: > I have files with this format > > text > text > |fs > > text > text > text > |fs > > The goal here is to make this data into a flat file of continuous > text (including the |fs).texttext|fstexttextt

FW: removing line feeds

2006-01-21 Thread Bowen, Bruce
On Jan 21, 2006, at 21:43, Bowen, Bruce wrote: > Perhaps that file has mixed newline conventions? Does > > $entire_file_content =~ tr/\015\012//d; > > do what you need? > > -- fxn > > That did not work. I've looked into the file with a hex editor it >

substitution

2006-02-12 Thread Bowen, Bruce
I have a text string = "^0176 ^0176" I have set $a = "^0176 ^0176"; I have set $b = "^0176 "; I'm using text =~ s/$a/$b/g; And the text string doesn't change. I expected it to come out as "^0176 " after the substitution. What is wrong with my logic? Bruce Bowen 401-568-8315

RE: substitution

2006-02-13 Thread Bowen, Bruce
That worked perfectly. Thanks, Bruce -Original Message- From: Michael Gargiullo [mailto:[EMAIL PROTECTED] Sent: Monday, February 13, 2006 10:47 AM To: Bowen, Bruce Cc: beginners@perl.org Subject: RE: substitution The carrot is a special char, so if you want that to be included as a

single step - debug mode

2006-02-13 Thread Bowen, Bruce
I've read my Llama book and been out to goggle on this and while I've found data that suggests it is possible to step thru a script file, I've yet to figure out the exact command structure to accomplish this. I think it's file.pl -s arguments but that isn't working so far as I can see. I've

end of line

2006-02-19 Thread Bowen, Bruce
I have a text file with lines of varying length. 000,;,001,WL0,001,001,000,000,000,000 011,@D ,011,000,001,050,050,105,105,004,004,064,255,000,001,116,255,255,255,106,255,255,255,255,116,255,255,255 012,D,038,032,000,002,000,001,000,000 013,@D ,013,000,001,050,050,105,105,004,004,064,255,000,00

bug or am I not understanding?

2006-02-20 Thread Bowen, Bruce
I have posted question related to this before and have received many suggestions. I have a file of varying number of records of varying lengths, delimited by comas. 022,D,092,000,004,034,000,001,000,000 023,D,031,000,000,000,000,002,000,000 024,@D ,025,000,001,900,900,093,093,900,255,065,000,2

RE: bug or am I not understanding?

2006-02-20 Thread Bowen, Bruce
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Tom Phoenix Sent: Monday, February 20, 2006 10:50 PM To: Bowen, Bruce Cc: beginners@perl.org Subject: Re: bug or am I not understanding? On 2/20/06, Bowen, Bruce <[EMAIL PROTECTED]> wrote: > My qu