Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Another Perl Question

  • 05-08-2004 04: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