misunderstanding the /g modifier on REGEX

2003-06-12 Thread M z
hello all - I am trying to do the following to this data: input: X|YZ||A desired output: X|Y| | | |Z| |A simply replacing || with | | whereever it may occur in the string. This bit of code doesn't seem to do all of the job. What is wrong with this code? while (<>) { while($_ =~ /([|])([|

misunderstanding the /g modifier on REGEX

2003-06-12 Thread M z
hello all - I am trying to do the following to this data: input: X|YZ||A desired output: X|Y| | | |Z| |A simply replacing || with | | whereever it may occur in the string. This bit of code doesn't seem to do all of the job. What is wrong with this code? while (<>) { while($_ =~ /([|])([|

RE: URGENT. Re: multi-line regex question, please help!

2002-07-02 Thread M z
at > the END of the match... and the carrot is only valid > at the beginning of the > regex. > > Something like this *might* be what you are looking > for if I understand > correctly... > > $_ = " > M0011 > spaceXYZabcdefh > "; > > $_ =~ s/(

URGENT. Re: multi-line regex question, please help!

2002-07-02 Thread M z
> Beside, seems you fotgot to close ; close =) > > Smiley Connie =) > > > > - Original Message - > From: "M z" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, July 02, 2002 8:51 AM > Subject: multi-line regex question, p

multi-line regex question, please help!

2002-07-02 Thread M z
Dear all, I am truly bewildered as to why I can't get this script to do what I want. Namely, to get the multiline match. Please help see section of code surrounded by for question area sample input: M0011 XYZabcdefh #!C:/perl/bin -w die "Usage perl qup.pl " unless @ARGV ==

Re: perl EXCEL app/Win32::OLE

2002-06-13 Thread M z
\\" and not "/". > > Since you are using Microsoft's Excel Engine, the > Excel APIs are very strict about the path syntax and > therefore, Perl's separatorChar of "/" (forward > slash) will not work! > > Cheers, > Rex > > - Original M

perl EXCEL app/Win32::OLE

2002-06-13 Thread M z
Dear all, i have a simple and silly question really..I downloaded this from the web, tried it, checked several times to ensure that my file location was correct and still had problemsthe error message is very obvious but I've checked file location SEVERAL times...please help...oh yeah, I do h

Re: use of HTML::Parser, HTML::FormatText

2002-04-04 Thread M z
uot;; open(X1, ">wow"); $tree = HTML::Tree->new(); $tree->parse_file(); print X1 "$tree\n"; my output was HTML::TreeBuilder=HASH(0x177f19c) I think this may be a really silly question, but please help! --- drieux <[EMAIL PROTECTED]> wrote: > > On

help please with syntax!

2002-04-01 Thread M z
Can someone help me decode this? or if not, please recommend a good reference book or site for my specific needs! thanks i wrote this script for use of active perl installed on win98 and used two modules #!C:\Perl\bin -w use HTML::Parse; use HTML::FormatText; # My question is here, insofar

use of HTML::Parser, HTML::FormatText

2002-03-31 Thread M z
hello, in conjunction, I was looking into this module HTML to take out all the HTML I have in several files. Namely, the data I want is between tags data does anyone have any practical experience using this module to do just that? what I really want to do is read in a huge file, say slurp it i

installing module

2002-03-31 Thread M z
hi I downloaded an HTML module from CPan, downloaded to my windows 98 machine, where I have Active Perl v5.6 installed. I downloaded it to the C:/Perl/lib directory and after unzipping and untarring, ran perl makefile.pl this was successful, but then from instructions, I was asked to install f

backreference question

2002-03-12 Thread M z
Hello I was wondering if someone could point me in the right direction for the following regex. s/(.{1,100}(?: |(\-))/$1$2\n/g; Please help on the second (?: |\-) I am trying to match either a single space ' ' or a - after 100 other characters and I want to save the - but not the ' ' thereby $2

help with my parser program?

2002-03-09 Thread M z
could someone please help me make this bit of code more efficient? I am trying to break really long lines, say up to 600 characters into manageable sizes (78 or less characters) but I do not want to break cleanly at position 78. If that is in the middle of a word, my program back steps to the fi

silly question

2002-03-07 Thread M z
does anyone know if there is a similar question form for unix? my roomate is studying to become a sys admin and I'm trying to direct him to a similar email? i.e. [EMAIL PROTECTED]??? __ Do You Yahoo!? Try FREE Yahoo! Mail - the world's greatest fr

creating custom switches in my program?

2002-03-07 Thread M z
t_d if -d was present. > > if( defined( $opt_d ) ) { > print "Option d was given!"; > } > else { > print "Option d was not given!"; > } > > Good luck! > Tanton > - Original Message - > From: "M z" <[EMAIL PROTECTED]>

RIPPING out info

2002-03-06 Thread M z
greetings if data on a website is not embedded in html tags, and it usually isn't (especially if what is being retrieved is an asp), does anyone know a simple way to hack the information out anyway? potentially a script that will extract info from the database whose info is being displayed on

help me with a better backstepper?

2002-03-06 Thread M z
Hi I've written a little program to analyze lines that are longer than 70 characters, and if so, break at position 70 (if it is whitespace), if not whitespace (i.e. is in the middle of a word) it steps back to the first whitespace and breaks there. However, I think there is probably a better way

creating custom switches in my program?

2002-03-05 Thread M z
Hello I was looking into documentation on the getopts module, but was having some difficulty understanding how to implement it. The scope of my problem is quite simple, actually. can someone help me create a snippet where if no argument is specified at the command line, than the output is writt

RE: urgent redundancy question

2002-03-04 Thread M z
ct and rerun"; > } > $b =~ s/B //; > $c =~ s/C //; > > if ($b eq $c) { > print "B $b\n"; > } > elsif ($b ne $c) { > print "B $b\n"; > print "C $c\n"; > } > > } > __

urgent redundancy question

2002-03-04 Thread M z
Hi I'm trying to remove to analyze two successive lines in a row and remove one of them if they say the same thing, like so...based on different beginning charactes sample input: B water C water if so, then only keep B water and discard C water I tried doing so with this snippet, but it wasn'

getting rid of additional space in array output

2002-02-24 Thread M z
hello I need some help badly on this slight technicality I am facing. I am reading every line of input into a scalar variable, spllitting on null, to get every character into an array, and then splicing. When I pring the array elements of interest, a space is appended to the input. Please help