Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Multiple Choice Quiz

by spaz (Pilgrim)
on Feb 13, 2001 at 03:35 UTC ( [id://58026]=note: print w/replies, xml ) Need Help??


in reply to Multiple Choice Quiz

For your second version I'd suggest changing
while (<QSTNS>) { $_ =~ /^(Quiz)(\d)$/; $max = $2; }
to
while (<QSTNS>) { ($max) =~ /Quiz(\d)/; }
It's more Perlish and clearer.
Also,
$_ =~ /([^,]+),([^,]+),([^,]+),([^,]+)/; push (@A,$1); push (@B,$2); push (@C,$3); push (@D,$4);
could be much more efficent using split. -- Dave

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-04-18 13:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found