- Original Message -
From: "Jenda Krynicky"
To: "Perl List"
Sent: Tuesday, December 22, 2009 6:44 PM
Subject: Re: XML::Simple question
From: "Mike Blezien"
Hello,
were using the XML/Simple module to process a XML response using the code
From: "Mike Blezien"
> Hello,
>
> were using the XML/Simple module to process a XML response using the code
> below.
> But for some reason the module can't read the $xmlresponse data unless we
> create
> a temp file first to store the data then pass that to the module. Is th
- Original Message -
From: "Robert Wohlfarth"
To: "Perl List"
Sent: Tuesday, December 22, 2009 5:47 PM
Subject: Re: XML::Simple question
On Tue, Dec 22, 2009 at 9:54 AM, Mike Blezien wrote:
were using the XML/Simple module to process a XML response using the
On Tue, Dec 22, 2009 at 9:54 AM, Mike Blezien wrote:
> were using the XML/Simple module to process a XML response using the code
> below. But for some reason the module can't read the $xmlresponse data
> unless we create a temp file first to store the data then pass that to the
> module. Is there
Hello,
were using the XML/Simple module to process a XML response using the code below.
But for some reason the module can't read the $xmlresponse data unless we create
a temp file first to store the data then pass that to the module. Is there a way
to do this without having to create a temp f
Thanks all .
On Sat, Nov 28, 2009 at 3:00 AM, Randal L. Schwartz
wrote:
> > "Majian" == Majian writes:
>
> Majian> Hi ,all:
> Majian> I have a problem about this :
>
> Majian> cat test:
> Majian> 12
> Majian> 23
> Majian> 34
> Majian> 45
> Majian> 56
> Majian> 67
>
> Majian> I want to bec
- Original Message -
From: "Dermot"
Newsgroups: perl.beginners
To: "John W. Krahn"
Cc: "Perl Beginners"
Sent: Friday, November 27, 2009 12:29 PM
Subject: Re: a simple question about the line
2009/11/27 John W. Krahn :
Hello,
$ echo &quo
> "Majian" == Majian writes:
Majian> Hi ,all:
Majian> I have a problem about this :
Majian> cat test:
Majian> 12
Majian> 23
Majian> 34
Majian> 45
Majian> 56
Majian> 67
Majian> I want to become like this :
Majian> 1223
Majian> 3445
Majian> 5667
Majian> I thought it for a long time , but I
2009/11/27 John W. Krahn :
> Hello,
>
> $ echo "12
> 23
> 34
> 45
> 56
> 67
> 78" | perl -lpe'$\=--$|?$,:$/'
> 1223
> 3445
> 5667
> 78
For the benefit of this Luddite, please explain?
Dp.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@
Majian wrote:
Hi, all :
Hello,
I have a problem about the lines of the file ,
like this :
cat test
12
23
34
45
56
67
78
...
==
I want to display like this :
1223
3445
5667
It means the next line is after the last line .
How do it by the Perl ?
$ echo "12
23
34
45
56
6
On Fri, Nov 27, 2009 at 8:34 PM, Majian wrote:
> Could you explain it ?
>
> What is the meaning of the $.? And Why use the "%2" operator?
>
$. means the line number, see perldoc perlvar and look for $.
%2 means the modulus operator.
# perl -le 'print $_%2 for 0..3'
0
1
0
1
HTH.
--
To unsub
Hi, all :
I have a problem about the lines of the file ,
like this :
cat test
12
23
34
45
56
67
78
...
==
I want to display like this :
1223
3445
5667
It means the next line is after the last line .
How do it by the Perl ?
Thanks in advance ~
--
To unsubscribe, e-
On Fri, Nov 27, 2009 at 8:03 PM, Majian wrote:
> Hi ,all:
>
> I have a problem about this :
>
> cat test:
> 12
> 23
> 34
> 45
> 56
> 67
> ...
>
> I want to become like this :
> 1223
> 3445
> 5667
> ...
>
# perl -e '
$m=<) {
chomp if $.%2;
print;
}'
1223
3445
5667
--
To unsubscribe, e-m
Hi ,all:
I have a problem about this :
cat test:
12
23
34
45
56
67
...
I want to become like this :
1223
3445
5667
...
That means the next line is after the above line ~
I thought it for a long time , but I have no idea yet~~
Can someone help me ?
Thanks
On Friday 23 Oct 2009 15:16:15 Shawn H Corey wrote:
> getget wrote:
> > The content of 2 files output.xml and input.xml are different. How can
> > I create the output file its content the same with input.xml.
>
> Use a different parser than XML::Simple. I suggest XML::Twig.
>
> XML::Simple does
getget wrote:
> The content of 2 files output.xml and input.xml are different. How can
> I create the output file its content the same with input.xml.
Use a different parser than XML::Simple. I suggest XML::Twig.
XML::Simple does not distinguish between attributes and content.
Because of this, i
Hi All.
When using XML::Sample, I have a question, who can help me.
First I have output.xml file:
Mp3 converter
Real player
Microsoft project
Poedit
Metrix
Line
Sudoku
I use XML::Sample to read, after that I save to ou
On Thu, Jul 23, 2009 at 21:29, Steve Bertrand wrote:
> I just ran into an issue where I was loosing literally half of some
> expected data, which for a theoretical accounting system, would make for
> some interesting audit trails (I already shave a fraction for myself,
> but 50% will be noticeable
I just ran into an issue where I was loosing literally half of some
expected data, which for a theoretical accounting system, would make for
some interesting audit trails (I already shave a fraction for myself,
but 50% will be noticeable ;)
Is my oversight as simple as knowing that the previous-to
Rob Dixon wrote:
Richard Lee wrote:
while trying to study the article on perlmonks.org,
http://perlmonks.org/?node_id=490846
regarding XML parsing, I need bit of clarfication.
how do I parse out
http://www.oreilly.com/catalog/covers/perlbp.s.gif";
width="145" height="190" />
ee what "Simple Questions" actually is.
The subject line is almost certainly the result of a bug in someone's email
client, which discarded everything up to the last colon. It used to read
XML::Simple question
Rob
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
Richard Lee wrote:
> while trying to study the article on perlmonks.org,
>
> http://perlmonks.org/?node_id=490846
>
> regarding XML parsing, I need bit of clarfication.
>
> how do I parse out
>
> http://www.oreilly.com/catalog/covers/perlbp.s.gif";
> width="145" height="190" />
>
ns" actually is.
- Original Message -
From: "Stewart Anderson" <[EMAIL PROTECTED]>
To: "Richard Lee" <[EMAIL PROTECTED]>; "Perl Beginners"
Cc: "Stewart Anderson" <[EMAIL PROTECTED]>
Sent: Wednesday, October 22, 2008 3:16 AM
Subject: RE: :S
> -Original Message-
> From: Richard Lee [mailto:[EMAIL PROTECTED]
> Sent: 22 October 2008 06:00
> To: Perl Beginners
> Subject: XML::Simple question
>
> while trying to study the article on perlmonks.org,
>
> http://perlmonks.org/?node_id=490846
>
>
Richard Lee schreef:
> how do I parse out
>
> http://www.oreilly.com/catalog/covers/perlbp.s.gif";
> width="145" height="190" />
>
> I tried $book->{image}->{src}... but doesn't work..
>
> use XML::Simple qw(:strict);
>
> my $library = XMLin($filename,
> ForceArray => 1,
>
while trying to study the article on perlmonks.org,
http://perlmonks.org/?node_id=490846
regarding XML parsing, I need bit of clarfication.
how do I parse out
http://www.oreilly.com/catalog/covers/perlbp.s.gif";
width="145" height="190" />
I tried $book->{image}->{src}... but d
t;
> To: Alex Goor <[EMAIL PROTECTED]>
> Sent: Sunday, April 27, 2008 12:43:47 PM
> Subject: Re: simple question
>
> you should use hash, see more detail
> perldoc perldsc
>
>
> use strict;
> use warnings;
> my %hash_symbol;
>
> while (my $message = <
Alex Goor wrote:
i have a data set of stock orders and i want to count the number of unique
stock symbols in the set.
i have turned the data set into an array and based on the message spec, i
can identify the stock symbols. but i don't know how to make sure i'm only
counting unique ones.
U
Alex Goor wrote:
i have a data set of stock orders and i want to count the number of unique stock symbols in the set.
i have turned the data set into an array and based on the message spec, i can
identify the stock symbols. but i don't know how to make sure i'm only
counting unique ones.
i
i have a data set of stock orders and i want to count the number of unique
stock symbols in the set.
i have turned the data set into an array and based on the message spec, i can
identify the stock symbols. but i don't know how to make sure i'm only
counting unique ones.
i had thought to do
Tony Marquis wrote:
Very simple question.
I'm reading a file and i want to remove all the in each lines.
while(FIC) {
$test = $_; #remove crlf.
... some code
}
How can i do that.
Try
$test =~ s/[\r\f]//g;
to remove newlines, use
$test =~ s/[\n]//g;
On Mon, 30 May 2005 13:09:23 -0400
Tony Marquis <[EMAIL PROTECTED]> wrote:
> Very simple question.
>
> I'm reading a file and i want to remove all the in each lines.
>
> while(FIC) {
>
> $test = $_; #remove crlf.
> ... some code
>
&g
Very simple question.
I'm reading a file and i want to remove all the in each lines.
while(FIC) {
$test = $_; #remove crlf.
... some code
}
How can i do that.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Tony Marquis wrote:
I'm creating a script that open a directory.
create a file call lock
Work in the directory.
delete the lock file and quit.
my ($rep_em) = "/test";
opendir (DIR, $rep_em) || die ("Error open directory $rep_em.");
chdir($rep_em) || die ("Error change directory to $rep_em");
my @fi
I'm creating a script that open a directory.
create a file call lock
Work in the directory.
delete the lock file and quit.
my ($rep_em) = "/test";
opendir (DIR, $rep_em) || die ("Error open directory $rep_em.");
chdir($rep_em) || die ("Error change directory to $rep_em");
my @fic = readdir(DIR);
Thank you very much, I will look into xpath and xlst. :-)
Chris Devers wrote:
On Fri, 15 Apr 2005, BJ wrote:
I am trying to write a script to aggregate diverse xml documents into
tables. The trick is that i dont know the exact stucture of the xml
files in advance. [] I basically want every
On Fri, 15 Apr 2005, BJ wrote:
> I am trying to write a script to aggregate diverse xml documents into
> tables. The trick is that i dont know the exact stucture of the xml
> files in advance. [] I basically want every bit of data from every
> node in Data. Any ideas on how to do that? I am
I am trying to write a script to aggregate diverse xml documents into
tables. The trick is that i dont know the exact stucture of the xml
files in advance. I have a stripped down version of the script I am
trying to create that I will include. The preprocessing part of the
script is trying to c
You could use HTML and thus the tags around the the items. But
this means the recipient needs a HTML ready email clinent to see it.
On Mon, 13 Dec 2004 15:48:20 -0500, Debbie McNerney
<[EMAIL PROTECTED]> wrote:
> Hi
>
> I have a simple question but I cannot find how to do thi
Hi
I have a simple question but I cannot find how to do this. I have a cgi
script using perl. The purpose of the script is to parse the contents of an
html form and to generate a simple email alert and send it to the
appropriate email (filled in on the form).
It's the contents of the email
On Mon, 13 Dec 2004, Debbie McNerney wrote:
> It's the contents of the email I am writing this post about. I can
> create a very simple email shown below. But I would like to make this
> a bit better by bolding the catagorys.
As another commenter noted, formatting in an email message generally
2004 10:48 PM
Subject: Simple question
Hi
I have a simple question but I cannot find how to do this. I have a cgi
script using perl. The purpose of the script is to parse the contents of an
html form and to generate a simple email alert and send it to the
appropriate email (filled in on the for
In a message dated 6/16/2004 12:10:54 PM Eastern Daylight Time,
[EMAIL PROTECTED] writes:
>Thanks in advance for your kind help.
>
>For the following string:
>
>" axyzb cxyzd "
>
>What is the command to extract the substrings with "xyz" in them? In this
case, I'd like to >get two st
This code should do it.
my $List = " axyzb cxyzd ";
my @Words = split(' ', $List);
print "@Words\n";
my $Word;
my @xyz;
foreach $Word (@Words) {
push @xyz, $Word if $Word =~ /.*xyz.*/;
}
print "@xyz";
"Kevin Zhang" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> Tha
On Jun 16, Kevin Zhang said:
>One more question, how do I strip out all letters before "xyz". For the
>original example, how would I get "xyzb" and "xyzd"?
I would suggest this slightly modified grep():
my @matches =
grep { /(xyz.*)/ and ($_ = $1) }
split ' ', $string;
Here, instead o
Thank you so much (and for the tip too). It works great!
One more question, how do I strip out all letters before "xyz". For the original
example, how would I get "xyzb" and "xyzd"?
Thanks again,
Kevin
David Dorward <[EMAIL PROTECTED]> wrote:
Tip: This is a beginners list, therefore many que
On Jun 16, Kevin Zhang said:
>For the following string:
>
>" axyzb cxyzd "
>
>What is the command to extract the substrings with "xyz" in them? In this
>case, I'd like to get two strings "axyzb" and "cxyzd".
Well, you could do:
my @matches = grep /xyz/, split ' ', $string;
Let me
Tip: This is a beginners list, therefore many questions will be simple.
Aim for more descriptive subject lines and life will be easier for
users of the list archives.
On 16 Jun 2004, at 17:10, Kevin Zhang wrote:
For the following string:
" axyzb cxyzd "
What is the command to extrac
Thanks in advance for your kind help.
For the following string:
" axyzb cxyzd "
What is the command to extract the substrings with "xyz" in them? In this case, I'd
like to get two strings "axyzb" and "cxyzd".
-
Do you Yahoo!?
Y
- Original Message -
From: "William Martell" <[EMAIL PROTECTED]>
To: "perl-win32-users" <[EMAIL PROTECTED]>
Sent: Thursday, December 18, 2003 11:24 AM
Subject: Win32::OLE, Simple Question
> Hello All,
>
> Could anyone help me with this script.
From: Trevor Morrison [mailto:[EMAIL PROTECTED]
Sent: Friday, August 08, 2003 9:09 AM
To: [EMAIL PROTECTED]
Subject: Simple question
Hi,
I am trying to compare two arrays to find common numbers in both. For the
numbers that are not common to both, I want to write them to a file for my
review.
- Original Message -
From: Trevor Morrison <[EMAIL PROTECTED]>
Date: Friday, August 8, 2003 9:09 am
Subject: Simple question
> Hi,
Hello
>
> I am trying to compare two arrays to find common numbers in both.
> For the
> numbers that are not common to both, I wa
I didn't understand your question but
$line[1] = $line[1]/1000;
shall work
$line[1] /= 1000;
must be faster
-Original Message-
From: Sommer, Henrik [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 05, 2003 5:05 PM
To: [EMAIL PROTECTED]
Subject: Simple question
Trevor Morrison <[EMAIL PROTECTED]> wrote:
I am trying to compare two arrays to find common numbers in both. For
the numbers that are not common to both, I want to write them to a file
for my review.
Check the FAQ:
perldoc -q "difference of two arrays"
How do I compute the difference of two ar
Hi,
I am trying to compare two arrays to find common numbers in both. For the
numbers that are not common to both, I want to write them to a file for my
review. I have included the code below, but it is not working as intended.
I know that this is a real basic question, but I have been staring
> Subject: Simple question
> Date: Fri, 8 Aug 2003 07:09:24 -0600
> From: "Trevor Morrison" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
>
> Hi,
>
> I am trying to compare two arrays to find common numbers in both.
For the
> numbers that are n
You seemed to have just answered your own question if I completely understand what
you're asking.
@array = qw/1000 50 20 2000/;
$var1 = $array[0]/10; #100
$var2 = $array[1]/10; #2
$var3 = $array[3]/2000; #1
If anything is not clear just say so.
Chris Carver
Pennswoods.Net
Mail Administrator
You method does work !
However, you can write as :
$line[1] /= 1000;
# which is the same as $line[1] = $line[1] / 1000;
HTH
- Original Message -
From: "Sommer, Henrik" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 05, 2003 11:05 PM
Subject:
Hi,
How do I divide a variable in an array ?
Lets say element one need to be divided by 1000?
$line[1] = $line[1]/1000;
Thanks,
Henrik
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Sitha Nhok wrote:
> Hi, if I have a multidimensional array like :
>
> @AoA = (
> ["ABC", "BCD"],
> ["CDE", "DEF"],
> ["EFG", "FGH"],
> );
>
>
> then do:
>
> @var = splice @AoA, 2, 1; # to delete the last row
>
> print @var; #print
Sitha Nhok wrote:
> Hi, if I have a multidimensional array like :
>
> @AoA = (
> ["ABC", "BCD"],
> ["CDE", "DEF"],
> ["EFG", "FGH"],
> );
>
>
> then do:
>
> @var = splice @AoA, 2, 1; # to delete the last row
>
> print @var; #print
"Rob Anderson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> "Sitha Nhok" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Hi, if I have a multidimensional array like :
> >
> > @AoA = (
> > ["ABC", "BCD"],
> > ["CDE", "DEF"],
> >
"Sitha Nhok" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi, if I have a multidimensional array like :
>
> @AoA = (
> ["ABC", "BCD"],
> ["CDE", "DEF"],
> ["EFG", "FGH"],
> );
>
>
> then do:
>
> @var = splice @AoA
Hi, if I have a multidimensional array like :
@AoA = (
["ABC", "BCD"],
["CDE", "DEF"],
["EFG", "FGH"],
);
then do:
@var = splice @AoA, 2, 1; # to delete the last row
print @var; #print what was returned from splice
perl will print anything you tell it to but yes the browser
will display the html and run javascript how it thinks it should so there is no fool
proof way to make it work for every browser exactly the same way.
Dan
-Original Message-
From: R. Joseph Newton [mailto:[EMAIL PROTECTED]]
Hi,
If you are moving from a ten-line Javascript routine to perl, do you cgi first on a
simple form with two or t\hree fields. You must learn to crawl before you try to run
a marathon.
When you've made a couple simple cgi forms work, and get back to this, here are some
preliminary tips:
1) D
day, December 27, 2002 11:02 AM
To: [EMAIL PROTECTED]
Subject: Simple Question
I have a cgi that gets variables from a form (only numeric) and that form is
sent to a text file to get the information that I need later. What I'm
having problems with is that I need some fields to add the
I have a cgi that gets variables from a form (only numeric) and that form is
sent to a text file to get the information that I need later. What I'm
having problems with is that I need some fields to add themselves and
display different totals on the same form when a modification is made to one
Hi Michael,
A couple others have already advised you on Perl arrays, so for your immediate issue,
I'd say go with their advice. Bear in mind though, that Perl arrays will not teach
you the standards for managing arrays that you need in orfer to be truly portable in
your programming skills.
I
> -Original Message-
> From: Michael Kramer [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 26, 2002 1:34 PM
> To: [EMAIL PROTECTED]
> Subject: Simple question.
>
>
> I need to make an array with multiple levels example:
> I'm new to perl and have
From: "Michael Kramer" <[EMAIL PROTECTED]>
> I need to make an array with multiple levels example:
> I'm new to perl and have been programming in VBscript for about 2
> years now so the code here is in vb because i know that better.
>
> dim my_array(1,3)
my @my_array;
>
I need to make an array with multiple levels example:
I'm new to perl and have been programming in VBscript for about 2 years now
so the code here is in vb because i know that better.
dim my_array(1,3)
my_array(0,0) = "fred"
my_array(0,1) = "John"
my_array(0,2) = "mike"
my_array(0,3) = "dork"
my_
On 10/31, Gajo Csaba said something like:
> I've started learning Perl a few days ago, but I'm a
> computer science student, so I'm not a complete idiot
> :)
Do you really want to "sub print"?
> sub print
> {
> etc...
--
Shawn Leas
[EMAIL PROTECTED]
Right now I'm having amnesia and deja-vu at
x $c2 = $table[$c1]->[$c2]\n";
}
print "\n\n\n\n";
}
- Original Message -
From: "Gajo Csaba" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 31, 2002 9:29 PM
Subject: A very, very simple question
> -Original Message-
> From: Gajo Csaba [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 31, 2002 10:29 AM
> To: [EMAIL PROTECTED]
> Subject: A very, very simple question
>
>
>
> Hi,
> I've started learning Perl a few days ago, but I'm a
Hi,
I've started learning Perl a few days ago, but I'm a
computer science student, so I'm not a complete idiot
:)
This is the problem: I'm trying to make a simple 2D
matrix that represents the product of the numbers 1-10
(don't know how to tell it in English, it's that table
that kids learn when
On Monday, July 8, 2002, at 09:58 , Connie Chan wrote:
> But do you have any much simplier idea so I can just
> use myLib; # would be all done ?
yes, make a module then 'hard wire' your applications with the
use DTK::Net::DI704;
if that is where you have stuffed all the things it wil
On Monday, July 8, 2002, at 08:02 , Connie Chan wrote:
[..]
> But what can I do, so my path can always
> aligned to @INC ?
>
three basic strategies:
a) make sure that your packages that you build
get installed into the site_location by default
hence no ne
Hi all,
I know @INC carries the paths for modules,
and I can push a path to @INC so I can also
reach the modules at assigned path.
But what can I do, so my path can always
aligned to @INC ?
Rgds,
Connie
uot;blue\n" : print "red\n" }
> -Original Message-
> From: Bryan R Harris [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 05, 2002 1:52 PM
> To: [EMAIL PROTECTED]
> Subject: Re: probably a simple question
>
>
>
>
> > $_ % 2 ? print "bl
Bryan R Harris wrote at Wed, 05 Jun 2002 19:51:49 +0200:
>> $_ % 2 ? print "blue\n" : print "red\n" foreach (@your_list);
>
>
> This actually works?! Very strange notation, how does the compiler see this line?
>I assume the
> mod operator evaluates to 1-true or 0-false, what does the "?" do?
, June 05, 2002 10:52
To: [EMAIL PROTECTED]
Subject: Re: probably a simple question
> $_ % 2 ? print "blue\n" : print "red\n" foreach (@your_list);
This actually works?! Very strange notation, how does the compiler see
this line? I assume the mod operator evaluates to 1-tru
an R Harris [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 05, 2002 1:52 PM
> To: [EMAIL PROTECTED]
> Subject: Re: probably a simple question
>
>
>
>
> > $_ % 2 ? print "blue\n" : print "red\n" foreach (@your_list);
>
>
> This actually w
> $_ % 2 ? print "blue\n" : print "red\n" foreach (@your_list);
This actually works?! Very strange notation, how does the compiler see
this line? I assume the mod operator evaluates to 1-true or 0-false, what
does the "?" do? What does the ":" do? How do you have a foreach at the
end of a
> -Original Message-
> From: Zachary Buckholz [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 04, 2002 10:11 PM
> To: [EMAIL PROTECTED]
> Subject: probably a simple question
>
>
> Is there any function to tell if a number is even or odd?
> I am looking for an
>
Sent: Wednesday, June 05, 2002 5:01 PM
Subject: Re: probably a simple question
> Zachary Buckholz wrote:
>
> > Is there any function to tell if a number is even or odd?
> > I am looking for an easy way to loop through a list and
> > output table cell bgcolor based on eve
Zachary Buckholz wrote:
> Is there any function to tell if a number is even or odd?
> I am looking for an easy way to loop through a list and
> output table cell bgcolor based on even / odd.
>
> if its an even numbered row make it red if its odd make
> it blue.
$_ % 2 ? print "blue\n" : print "r
> Is there any function to tell if a number is even or odd?
> I am looking for an easy way to loop through a list and
> output table cell bgcolor based on even / odd.
>
> if its an even numbered row make it red if its odd make
> it blue.
>
> I have done it in the past by turning a switch on or o
Is there any function to tell if a number is even or odd?
I am looking for an easy way to loop through a list and
output table cell bgcolor based on even / odd.
if its an even numbered row make it red if its odd make
it blue.
I have done it in the past by turning a switch on or off
but I think t
On Friday, May 24, 2002, at 08:23 , Leon, Yanet I,,DMDCWEST wrote:
[..]
> s/^\#(shell\s.*tcp\s.*\sin.rshd)$/$1/;
>
> I want to call the above script from another longer one to just perform
> the
> replacement passing a file name as the argument. The lines on the calling
> file should look as f
perldoc -f system
or
perldoc -f exec
or
use of backtick stuff
$script_result=`//bin/perl script.pl arg1 arg2 `;
HTH,
José.
"Leon, Yanet I,,DMDCWEST" <[EMAIL PROTECTED]> a écrit : How do I invoke a perl
program from within another perl program? I don't
need to use a module or create one fo
How do I invoke a perl program from within another perl program? I don't
need to use a module or create one for this purpose. I have a simple script
which performs a replacement:
substitute.pl
#!/pkg/public/bin/perl -pi.bak This edits a file and creates a backup of
the edited. This is why I w
AM
To: 'Stuart Clark'; 'Perl List'
Subject: RE: A simple question
> -Original Message-
> From: Stuart Clark [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 17, 2002 11:08 PM
> To: 'Perl List'
> Subject: A simple question
>
>
> Hi All
> -Original Message-
> From: Stuart Clark [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 17, 2002 11:08 PM
> To: 'Perl List'
> Subject: A simple question
>
>
> Hi All
> Is there an easier way of picking out the number 16764 in this line
> rather t
Hi All
Is there an easier way of picking out the number 16764 in this line
rather that using an array, split then $number[3]
I just want to get 16764 into $recievedmail
Is the answer something like this
$recievedmail = ($data)[3];
$data = "Received 921MB 16764 3955 375 2.2% 1296 7.7%";
Stuart Clark wrote:
>
> Hi All
> Is there an easier way of picking out the number 16764 in this line
> rather that using an array, split then $number[3]
>
> I just want to get 16764 into $recievedmail
>
> Is the answer something like this
>
> $recievedmail = ($data)[3];
>
> $data = "Received
Hi All
Is there an easier way of picking out the number 16764 in this line
rather that using an array, split then $number[3]
I just want to get 16764 into $recievedmail
Is the answer something like this
$recievedmail = ($data)[3];
$data = "Received 921MB 16764 3955 375 2.2% 1296 7.7%";
heck this right now, but let me know if it
works for you.
Thanks,
Robert Aspinall
V-ONE Corporation
[EMAIL PROTECTED]
- Original Message -
From: "suraj rajendran" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 04, 2002 6:35 PM
Subject: Simple question
On Mar 4, Jeff 'japhy' Pinyan said:
>And then you'll want to remove the extraneous information.
>
> ($city, $state) = $addr =~ /\s*([^,]+),\s*([A-Z]{2})/;
I left the first comma out of my regex.
($city, $state) = $addr =~ /,\s*([^,]+),\s*([A-Z]{2})/;
>>__DATA__
>>Tomy Savage:408-724-0140:12
On Mar 4, suraj rajendran said:
>How do I just print only the City and State where
>person lives assuming that I have the following data.
It looks like your data is :-delimited. For your purposes, the
split() function should do fine:
($name, $phone, $addr, $bday, $n) = split /:/, $record;
O
1 - 100 of 176 matches
Mail list logo