Workshop

Quiz

1:The following URL will work as expected.

<a href="/cgi/foo.pl?name=Ben Franklin&Job=printer">

  1. True.

  2. False; you can't pass two parameters to a CGI program in this way.

  3. False; the space in the name Ben Franklin is not allowed.

2:Why does using cookies for long-term storage sometimes fail?
  1. Browsers can “throw away” cookie information.

  2. Cookies can be lost during software updates.

  3. Users may turn off cookie support in their browsers.

3:To make a cookie expire one week from now, use the -expire option to the cookie function with what?
  1. +7d

  2. +1w

  3. +10080m

Answers

A1: c. You should use escape to properly hide spaces and other special characters.
A2: All the above.
A3: Either choice a or c. The +1w argument is invalid.

Activities

  • Use a Telnet client to ...

Get SAMS Teach Yourself Perl in 24 Hours THIRD EDITION now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.