On Wed, Nov 5, 2008 at 2:45 AM, <[EMAIL PROTECTED]> wrote:

> On Nov 4, 5:16 am, [EMAIL PROTECTED] (Peter Scott) wrote:
> > On Mon, 03 Nov 2008 21:12:40 -0800, sanju.shah wrote:
> > > I have a string: "   Confirming: yes                 Supplier
> > > Telephone: 213-923-0392"
> >
> > > I want to split the string so that i can capture yes in $conf and
> > > 213-923-0392 in $tele.
> >
> > > TIA for all the help,
> >
> > What have you tried so far?  When you read perldoc -f split. what does
> > that suggest to you?
> >
> > --
> > Peter Scotthttp://www.perlmedic.com/http://www.perldebugged.com/
>
>
> my String = "Order Number: asc100    Revision:   0"
>
> I have been trying to split the string based on the Text before the
> ":" sign to get the data following the ":" sign.
>
>      @Order_Line1 = split (/ +Revision:/i, "$'") if ($form_line =~ /
> Order Number:/i);
>
> without any luck though :(
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> http://learn.perl.org/
>
>
>

What you are saying is that:

my $string = "Order Number: asc100    Revision:   0";
my @text = split / +Revision:/i, $string if ($string =~ /Order Number:/i);
use Data::Dumper;
print Dumper @text;
Does not work? It produces the following output:

$VAR1 = 'Order Number: asc100';
$VAR2 = '   0';
Which seems quite correct to me... the text is as you told perl to do split
on the text Revision: so the two parts that are left over are: 'Order
Number: asc100' and: '   0'.
Is that not correct? What is the result that you would like to see?
Providing that might help other help you resolve this problem.

Regards,

Rob

Reply via email to