Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Re: Re: Calculate grades

by DamnDirtyApe (Curate)
on Apr 02, 2004 at 01:48 UTC ( #341862=note: print w/replies, xml ) Need Help??

in reply to Re: Re: Calculate grades
in thread Calculate grades

There's not really anything to decide. Putting an array inside quotes returns a scalar with the array contents, so if $foo == [ 'a', 'b' ], then "@$foo" == "ab". The regexp searches that string for the answer, so if the answer given was "b", what were essentially doing is "ab" ~= /b/i. This will match, and the correct grade counter is incremented.

Make sense?

Those who know that they are profound strive for clarity. Those who
would like to seem profound to the crowd strive for obscurity.
            --Friedrich Nietzsche

Replies are listed 'Best First'.
Re: Re: Re: Re: Calculate grades
by Anonymous Monk on Apr 02, 2004 at 01:59 UTC
    yeap, thanks

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://341862]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2021-10-22 21:37 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (85 votes). Check out past polls.