[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Starting Off [was ongoing support of CFM68K]



Given your 3 projects:

>>1) publish a 15 field database and include a page via which people wanting
>>to register can submit an application,
>>2) analyse the popularity of songs on a site with 50 RealAudios on it,
>>currently getting 1100 ram downloads a day,
>>3) extract multiple search engine responses for offline browsing (there's
>>no such thing as free local calls in the UK)

and your context:

>a. How much time do you have - barring acts of God and getting a job,
>time's OK
>b. What level of knowledge of perl do you have now - very little.
>c. What areas of knowledge of perl do you have - literals, variables,
>operators pretty much sorted, functions next to be memorised. So, not many.
>d. What areas of non perl knowledge do you have - good HTML, good FMPro4.1
>Scriptmaker, Photoshop, Quark, loads of music programs, 12 years on a Mac.
>e. Where do you lie on the line between "I just love the process of
>writing programs" v "I just want what the programs can do" - exactly at
>both ends... er...

I'd work through the following:

1. Write a script that takes the string "name=jim&age=35" typed on the
keyboard and print it back to the screen in the line "What was typed is:
name=jim&age=35"

2. Write a script that takes the string "name=jim&age=35" typed on the
keyboard and splits it up and puts it into and array which has two
elements, being "name=jim", and "age=35", and print each element to the
screen with each element being on a seperate line.

3. Write a script that takes the string "name=jim&age=35" typed on the
keyboard and print it to a file.

4. Write a script that opens the file in 3 above and prints the string
"name=jim&age=42" [note age has changed] by first reading the line from the
file.

5. Get a message which you created to print on your screen by trying to
open a file that you know dosen't exist.

6. Write a script that uses a here document to print the following to your
screen as it is [that is there will be text on five lines]:
A person could get
RSI without here documents, a little
bit here, a little bit there and
no hassle with newlines all
the time.

7. Put this script on your webserver, and get it to run by clicking a
submit button in an html form

#!/usr/bin/perl
use CGI::Carp 'fatalsToBrowser';

# the old html on the way back to client that called the script line
print "Content-type: text/html\n\n";

# what you are sending back
print<<'HTML';
<html>
<head><title>That Was Easy</title>
<Body bgcolor="white">
Check this out.
</body>
</html>
HTML

8. Create a html form that takes two bits of input from a user and sends
that input to a cgi script which you've written and placed on your
webserver. Make the cgi script send back to your browser some html that
simply says: "The string that is the input is: ..........."
$ENV{'QUERY_STRING'} when the script is called will contain the input string.

9. Do the same as you've done in 8 using the module called CGI.pm

Hope this helps ... sorry about delay.

Cheers ... John



===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org