Re: Create an array of arrrays from a scalar

2001-08-07 Thread Abdulaziz Ghuloum

Hello,

Having studied the dragon book and others more than once, took about 10
minutes to write this parser that worked to my surprise the first time.
God bless LISP and LISP-like grammers.

Aziz,,,
###
program
###
#!/perl -w
use Data::Dumper;
use Switch;
my $str = <61001A8E5BE9D0119D1E0008C728E0C3227F13@ntusa2>, "Chris Rogers"
<[EMAIL PROTECTED]> wrote:

> Maybe I'm crazy, but I would like to create an array of arrays from a
> single string.  Here's an example of a string: (("TEXT" "PLAIN"
> ("format" "flowed") NIL NIL "7BIT" 206 4 NIL NIL NIL)("TEXT" "PLAIN"
> ("name" "Display.txt" "format" "flowed") NIL NIL "8BIT" 16330 412 NIL
> ("attachment" ("filename" "Display.txt")) NIL) "mixed" ("boundary"
> "=_NextPart_000_36cf_58cd_f54") NIL NIL) This string will be
> contained a single scalar variable.  I have tried a few different
> things, all of which have failed miserably.  My guess is that spaces
> will need to be changed to commas. Any help would be greatly
> appreciated.
> 
> Thanks,
> Chris

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




RE: Create an array of arrrays from a scalar

2001-08-07 Thread Mooney Christophe-CMOONEY1

hehe -- i tried to do the exact same thing last year.

The solution?  Mail::*Client from CPAN (your example looks like IMAP, but i'm not sure 
...)

You may not be crazy now, but if you continue down this dark path, you'll certainly 
end up there.  Trust me.  ;)

-Original Message-
From: Chris Rogers [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 07, 2001 3:58 PM
To: Beginners@Perl. Org (E-mail)
Subject: Create an array of arrrays from a scalar


Maybe I'm crazy, but I would like to create an array of arrays from a single
string.  Here's an example of a string:
(("TEXT" "PLAIN" ("format" "flowed") NIL NIL "7BIT" 206 4 NIL NIL
NIL)("TEXT" "PLAIN" ("name" "Display.txt" "format" "flowed") NIL NIL "8BIT"
16330 412 NIL ("attachment" ("filename" "Display.txt")) NIL) "mixed"
("boundary" "=_NextPart_000_36cf_58cd_f54") NIL NIL)
This string will be contained a single scalar variable.  I have tried a few
different things, all of which have failed miserably.  My guess is that
spaces will need to be changed to commas. Any help would be greatly
appreciated.

Thanks,
Chris

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

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




Create an array of arrrays from a scalar

2001-08-07 Thread Chris Rogers

Maybe I'm crazy, but I would like to create an array of arrays from a single
string.  Here's an example of a string:
(("TEXT" "PLAIN" ("format" "flowed") NIL NIL "7BIT" 206 4 NIL NIL
NIL)("TEXT" "PLAIN" ("name" "Display.txt" "format" "flowed") NIL NIL "8BIT"
16330 412 NIL ("attachment" ("filename" "Display.txt")) NIL) "mixed"
("boundary" "=_NextPart_000_36cf_58cd_f54") NIL NIL)
This string will be contained a single scalar variable.  I have tried a few
different things, all of which have failed miserably.  My guess is that
spaces will need to be changed to commas. Any help would be greatly
appreciated.

Thanks,
Chris

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