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($_ =~ /([|])([|
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($_ =~ /([|])([|
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/(
> 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
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
==
\\" 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
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
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
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
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
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
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
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
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
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]>
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
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
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
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";
> }
>
> }
> __
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'
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
21 matches
Mail list logo