Hello,
Since you are having the whole file in an array.
1. Keep an index to specify the current line read
2. Once you found the desired string, you have the index also. So
you can
decrement the index and get the lines.
$inex = 0;
foreach $line (@lines) {
$index++;
if($line =~ m/
Hello,
in our application I have to convert all german Umlaute in a string to a
two char combination ä to ae, Ö to OE and so on.
Can anyone please tell me how to do this ?
Thanks
Andreas
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On 05/20/2007 11:37 PM, Dharshana Eswaran wrote:
Hi All,
The below code helps in reading a file in reverse:
use strict;
use warning;
open( FILE, $file_to_reverse )
or die( Can't open file file_to_reverse: $! );
@lines = reverse FILE;
foreach $line (@lines) {
# do something with $line
}
Thank you all..
But i dont want to use any perl modules in the code. I am trying to get a
logic without any help from the additional modules.
Thanks and Regards,
Dharshana
On 5/21/07, Mumia W. [EMAIL PROTECTED] wrote:
On 05/20/2007 11:37 PM, Dharshana Eswaran wrote:
Hi All,
The below code
Tony Heal [EMAIL PROTECTED] wrote:
Subject: list test (please ignore)
There are special test lists. Don't test on the real list.
--
Affijn, Ruud
Gewoon is een tijger.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Dharshana Eswaran schreef:
i am trying to grep for a string in the file and once i get the
string, I need to read few lines which occurs before the string.
The classic (state machine) approach is to start storing strings from
the start marker, so typedef union here, and discard the stored
On Mon, 21 May 2007 08:41:13 +0200
Andreas Moroder [EMAIL PROTECTED] wrote:
Hello,
in our application I have to convert all german Umlaute in a string to a
two char combination ä to ae, Ö to OE and so on.
Can anyone please tell me how to do this ?
Thanks
Andreas
for example:
%
Martin Barth [EMAIL PROTECTED] suggested:
On Mon, 21 May 2007 08:41:13 +0200
Andreas Moroder [EMAIL PROTECTED] wrote:
Hello,
in our application I have to convert all german
Umlaute in a string to
a two char combination ä to ae, Ö to OE and so on.
Can anyone please tell me
Tony Heal wrote:
OK I am probably missing something stupid, but I can not get this to work.
The output should be 'Daily-{day of week)-{MMM}-{DD}-{}' for Sunday
thru Friday and 'Weekly-{1|2|3}-{day of week)-{MMM}-{DD}-{} for
Saturday and every fourth Saturday should start rotating months
Keeping the classic (state machine) approach in mid, i tried writing a logic
for the same
But i am not able to retrieve the lines accurately,
Can you please help me with a small piece of code for the same logic which
you mentioned?
On 5/21/07, Dr.Ruud [EMAIL PROTECTED] wrote:
Dharshana
Hi,
Dharshana Eswaran [EMAIL PROTECTED] wrote:
Keeping the classic (state machine) approach in mid, i tried
writing a logic for the same
But i am not able to retrieve the lines accurately,
Can you please help me with a small piece of code for the
same logic which you mentioned?
This
Hi Andy,
Thanks for the reply.
I tried it out, but still not able to store error msgs.
What does 21 mean?
Is there any other way out.
Thanks,
Divya
Andy Greenwood wrote:
On 5/18/07, divya [EMAIL PROTECTED] wrote:
Hi,
I want to store the output of following command:
vcover merge
divya wrote:
Hi Andy,
Thanks for the reply.
I tried it out, but still not able to store error msgs.
What does 21 mean?
This means redirecting standard error to standard output.
-srini
Is there any other way out.
Thanks,
Divya
Andy Greenwood wrote:
On 5/18/07, divya [EMAIL PROTECTED]
Angerstein wrote:
Ethereal would do, too.
They've changed the name from Ethereal to Wireshark.
John
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Dharshana Eswaran schreef:
You really shouldn't quote text that is no longer relevant, such as
signatures and mailing list tails.
Ruud:
Dharshana Eswaran:
i am trying to grep for a string in the file and once i get the
string, I need to read few lines which occurs before the string.
The
Hello,
I am working with a XML gateway system which sends back response results in XML
format. I have been trying to work w/XML::Simple to parse the data, but not too
much success. This is a sample of the XML response data, the * indicate the
data we need to extract from XML file. I tried
I need to check for strings in a file. An example would be checking for a
username in /etc/passwd or /var/log/maillog. The string is in another file,
sometimes a single field on a line by itself, sometimes in a line with
other strings. Based on what I have seen online and what I have done in
other
Karyn Williams wrote:
I need to check for strings in a file. An example would be checking for a
username in /etc/passwd or /var/log/maillog. The string is in another
file, sometimes a single field on a line by itself, sometimes in a line
with other strings. Based on what I have seen online
Mike Blezien wrote:
Hello,
I am working with a XML gateway system which sends back response results in
XML format. I have been trying to work w/XML::Simple to parse the data, but
not too much success. This is a sample of the XML response data, the *
indicate the data we need to extract
I have a few hundred records in a file like the following
a:1
a:2
a:3
b:1
b:2
b:3
I'm trying to build a hash of where the values on the left is the key and
for each value on the right is an array containing the coresponding values I
hope this makes sense
$a{$a} = [EMAIL PROTECTED] where
- Original Message -
From: David Moreno Garza [EMAIL PROTECTED]
To: beginners@perl.org
Sent: Monday, May 21, 2007 8:23 PM
Subject: Re: Parsing XML data
Mike Blezien wrote:
Hello,
I am working with a XML gateway system which sends back response results in
XML format. I have been
Rodrick Brown 写道:
I have a few hundred records in a file like the following
a:1
a:2
a:3
b:1
b:2
b:3
I'm trying to build a hash of where the values on the left is the key and
for each value on the right is an array containing the coresponding
values I
hope this makes sense
$a{$a} = [EMAIL
Rodrick Brown wrote:
I have a few hundred records in a file like the following
a:1
a:2
a:3
b:1
b:2
b:3
I'm trying to build a hash of where the values on the left is the key and
for each value on the right is an array containing the coresponding values
I hope this makes sense
$a{$a}
Thank you very much, That's going to help
My IM is ready for account [EMAIL PROTECTED] (sorry, my first time using
AIM). I'm using WEB AIM Express (I don't wanna install IM application in to
computer.) and added you into my buddy,
I tried the program in some other computer's (all intel x86) all
24 matches
Mail list logo