open(FILEIN,"<$filein) || die "unable to open $filein: $!);
        Depending on the size, you could place all into an array or read line by line.

        Do you have the file? Able to copy into email(send to me only if desired).

Wags ;)

-----Original Message-----
From: Bhanu Prakash [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 21:57
To: Wagner-David; [EMAIL PROTECTED]
Subject: Re:[Q]Convert tcl list


Hi Wags,
   Whoops! That seems to solve the purpose.! But, How
do I read this data from a file into an array?!
Thanks
Bhanu.

$_ = 'mykey {{ abc xyz nnn mmm }} mykey2 {{ aaa bbb
ccc ddd}}';

my @MyData = ();
while ( /\{{2}([a-z0-9\s]+)\}{2}/g ) {
   push(@MyData, $1);
   
 }
 
my $MyId = 1;
foreach ( @MyData ) {
   printf "%3d: %s\n", $MyId++, $_;
 }

Output:
  1:  abc xyz nnn mmm
  2:  aaa bbb ccc ddd

Wags ;)

-----Original Message-----
From: Bhanu Prakash [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 21:38
To: [EMAIL PROTECTED]
Subject: [Q] Convert tcl list


Hi All,
    I have a list tcl list dumped onto a data file
which looks like
mykey {{ abc xyz nnn mmm }} mykey2 {{ aaa bbb ccc ddd
}}....,.....
I want to extract the information in the flower braces
and put it into another data file. How easy / or
difficult to implement this in perl? Can somebody help
me accomplish this? 
  I know I can do this using regular expressions.! But
, I'm bad at regexps!!
Thanks for the help
Bhanu.

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]



=====
Bhanu Prakash G V S

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to