Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Another Perl Question

  • 05-08-2004 3:31pm
    #1
    Closed Accounts Posts: 913 ✭✭✭


    Sorry to post another one here so soon...

    I have an array

    array[0] = DMA_ACCEPT
    array[1] = U1_ENCODER/u0_lcd/reg[0]

    and I have a scalar

    $scalar = U1_ENCODER/u0_lcd/reg[0]

    I wanna search my array for my scalar..
    Why doens't this produce a hit ?
    grep{/$scalar/}(@array)

    (It works when $scalar = DMA_ACCEPT)

    Any ideas ?

    TIA,
    Ray.


Comments

  • Closed Accounts Posts: 913 ✭✭✭HarryD


    Panic over.. problem solved.. :D

    Perl didn't like the / in the scalar
    I had to get rid of em and it worked !

    R


Advertisement