Workshop

 <  Day Day Up  >  

Quiz

1:

If you want to use the cwd function twice in a program, how many times do you have to use Cwd; ?

  1. Once.

  2. Once for each instance of cwd , so two times.

  3. None. cwd is a built-in function.

2:

What module provides an alias for the $_ variable?

  1. LongVars

  2. English

  3. $_ does not have an alias.

Answers

A1:

a. After a module has been pulled into your program with use , all its functions are available to use throughout the rest of your program.

A2:

b. use English causes $_ to be known by the name $ARG .

Activities

  1. Flip to Appendix A and try using the instructions there for installing the module Bundle::LWP from CPAN. You'll need a module in that bundle for the examples in Hour 24.

 <  Day Day Up  >  


SAMS Teach Yourself Perl in 24 Hours
Sams Teach Yourself Perl in 24 Hours (3rd Edition)
ISBN: 0672327937
EAN: 2147483647
Year: 2005
Pages: 241

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net