The problem is that '^' is defined in a pattern match to match the
beginning of a string.  so you need ot escape it.

@array = split / \^ /, $record;



On Wed, 3 Feb 1999, Daryl Williams wrote:

> Date: Wed, 03 Feb 1999 08:19:02 -0800
> From: Daryl Williams <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED],
    [EMAIL PROTECTED],
    [EMAIL PROTECTED],
    Madhavprasad Pai <[EMAIL PROTECTED]>
> Subject: Re: Problem in pattern matching of perl.
> 
> rajesh,
> 
> i belive the problem you are seeing is related to the fact that
> the "^" character is the "exclusive or" operator in perl, returning
> its operators xored together bit by bit, as defined in the perlop
> man page. hope this helps.
> 
> //daryl
> 
> 
> [EMAIL PROTECTED] wrote:
> 
> >  Hi
> >
> >         we are doing timesheet project for our company
> >         which uses perl extensively and scripts are running on linux ,
> >         perl version is 5.00552 , and Database is MSSQL6.5 on NT.
> >
> >         The problem is coming in matching the pattern as once we fetch
> >         a column from database ( which contains some data separeted by
> >         delimiter).
> >
> >         for eg.
> >
> >         data fetched from one column is  110 ^ 220 ^ 230 ^ 240 ^ 250 ^
> >         now we are splitting it on basis of delimiter (^) through following
> >         code.
> >
> >         $task   = 110 ^ 220 ^ 230 ^ 240 ^ 250
> >         @abc    = split(/ ^ / , $task)
> >
> >         if we print the values of @abc ,
> >         IT doesn't print anything.
> >
> >         One more thing , The data fetched from a column is always stored in
> >         a scalar variable.
> >
> >         Does anybody having an idea how this problem could be solved.
> >
> >         Thanks in advance.
> >
> > Bye
> > Rajesh Mittal
> > [EMAIL PROTECTED]
> >
> > --------------------------------------------------------------
> >  _         _   _       _   _     _     _      _
> > | |       | | | |\    | | | |   | |   \  \  /  /
> > | |       | | | |\ \  | | | |   | |    \  \/  /
> > | |       | | | | \ \ | | | |   | |
> > | |_____  | | | |  \ \| | | |___| |    /  /\  \
> > |_______| |_| |_|    \|_| |_______|   /_ /  \ _\
> >
> >
> > Rajesh Mittal
> > [EMAIL PROTECTED]
> > [EMAIL PROTECTED]
> >
> > Linux - The Battle is Not lost Untill Last Bullet is Fired
> >
> > --------------------------------------------------------------
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-net" in
> > the body of a message to [EMAIL PROTECTED]
> 
> --
>  Daryl Williams
>  Network Administrator     mailto:[EMAIL PROTECTED]
>  ShareWave, Inc.           Phone: 916-939-9400 x3212
>  5175 Hillsdale Circle     Fax: 916-939-9434
>  El Dorado Hills, CA. 95762Web: http://www.sharewave.com
> 
> 
> 
> -====---====---====---====---====---====---====---====---====---====---====-
>  to unsubscribe email "unsubscribe linux-admin" to [EMAIL PROTECTED]
>  See the linux-admin FAQ: http://www.kalug.lug.net/linux-admin-FAQ/
> 

-- 
------------------------------------------------------------------------------
[EMAIL PROTECTED]                                     Chris MacLeod
Web Systems Administrator                                www.miscellaneous.net

                  With blue, uncertain, stumbling buzz,
                  Between the light and me,
                  And then the windows failed, and then
                  I could not see to see.

        -Emily Dickenson        "I Heard A Fly Buzz When I Died"
------------------------------------------------------------------------------
 "Beware the penguins..."  -Morphy

 GNUpgp Public key Available - finger [EMAIL PROTECTED]

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to