Perl - Web Automation Lecture
By BitsNbytes


*** bitsNbytes has joined #bsrf
<bitsNbytes> hi ppl
<bitsNbytes> I am EXtremely sorry for being late
<bitsNbytes> should we begin with the lecture
<fatboyjoe> just when everyone had given up hope of seeing it
<bitsNbytes> yeah ..sorry man
<fatboyjoe> heh
<fatboyjoe> oh well
<fatboyjoe> better late than never I guess :)
<bitsNbytes> everyone eager and attentive
<pitpat> oh
<pitpat> yea
<bitsNbytes> hehe
<pitpat> i'm all ears
<pitpat> finally
<pitpat> ;O)
<bitsNbytes> lol
<Yodason> =)
<pitpat> ok bits
<pitpat> are you doing it on perl?
<bitsNbytes> k..the connection here in India is haywire t'day
<bitsNbytes> and hence the delay
<bitsNbytes> yeah..i'd like to know if there r total newbies too
<pitpat> <--- newbie of perl
<bitsNbytes> i mean those who are absolutely oblivious to the existence of perl and its basics
*** Getalife has joined #bsrf
*** _ciR_ has quit IRC (Ping timeout: 180 seconds)
<Getalife> Any phreakers around?
<pitpat> <--- not that much of a newbie
<pitpat> hehe
<bitsNbytes> hmm good then
<bitsNbytes> what i am about to share with you t'day is the relation of perl and the web
<pitpat> cgi
<pitpat> common gateway interface
<bitsNbytes> PRECISELY
<pitpat> ;O)
<bitsNbytes> hmm i have got a learned audience .. i must say
*** wascy|prepare_hack is now known as wascy
<pitpat> go on...
<bitsNbytes> when we talk of cgi..
<bitsNbytes> we are talking about dynamic information
<bitsNbytes> and interactivity
<pitpat> server-side
<pitpat> web
<bitsNbytes> yess.. that is what makes the web so ALIVE
*** jacs has quit IRC (Ping timeout: 180 seconds)
<bitsNbytes> Perl very much like other languages
<pitpat> doesn't need to be compiled
<bitsNbytes> supports the concept of modularity
<bitsNbytes> ok.. that too (very basic tho) ;)
*** wascy has quit IRC (Quit: )
*** jacs has joined #bsrf
<bitsNbytes> all modules are available today on Comprehensive Perl Archive Network (CPAN)
<bitsNbytes> for Perl and CGI to  be integrated we need the module
<Getalife> Any phreakers around?
*** fatboyjoe has quit IRC (Ping timeout: 180 seconds)
<bitsNbytes> that has to be included in our pel script
*** _ciR_ has joined #bsrf
<pitpat> ciR
<pitpat> i found the lecturer
<_ciR_> who
<pitpat> bitsNbytes
*** demontanus has quit IRC (Quit: Math is like sex. Add the people, subtract the clothes, divide the legs, and multiply.)
<pitpat> hehe
<bitsNbytes> let us begin with a sample basic program
<_ciR_> hehe
<pitpat> don't do the hello world plz
<pitpat> :O(
<_ciR_> looks like bsrf ous u
<bitsNbytes> nah don't worry
<pitpat> can you go a bit faster bits?
<pitpat> i'm getting sleepy
<bitsNbytes> i am trying
<bitsNbytes> but the network connection seems to be outof order
<bitsNbytes> #! /usr/bin/perl -w
<bitsNbytes> this is the line that acts like a include <> line in C
<bitsNbytes> the -w is for warnings on
<bitsNbytes> # a program for your type of babe
<bitsNbytes> this was a comment
*** rek has joined #bsrf
*** ChanServ sets mode: +o rek
<rek> hey
*** Arrowhead has quit IRC (Quit: )
<bitsNbytes> use CGI qw (param)   # a very important line.. includes the module
<rek> no lecture?
<pitpat> yea bitsNbytes is doing it right now
<bitsNbytes> print <<END_of_start;
<bitsNbytes> Content-type: text/html      #needs no explanation
<bitsNbytes> <HTML>
<bitsNbytes> <HEAD>
<bitsNbytes> <TITLE> My kinda girl </TITLE>
*** fatboyjoe has joined #bsrf
<bitsNbytes> </HEAD>
<bitsNbytes> <BODY>
<Getalife> Can anyone assist me in making a scanner out of a cordless phone?
<_ciR_> hahah not its HTML lecture
<_ciR_> then <p>hahah,</p>
*** rek has quit IRC (Quit: Leaving)
<bitsNbytes> <H1> Greetings Mortal </H1>
*** rek has joined #bsrf
*** ChanServ sets mode: +o rek
*** rek sets mode: +v bitsNbytes
<bitsNbytes> END_of_start
*** sohed has joined #bsrf
*** zwanderer has joined #bsrf
<bitsNbytes> my $favorite=param("brunette");
<bitsNbytes> print "<P> Your favorite flavor is $favorite.";
<bitsNbytes> print <<ALL_Done;
<bitsNbytes> </BODY>
<bitsNbytes> </HTML>
<bitsNbytes> ALL_Done
<bitsNbytes> well was this understood
*** freespeachlamer has joined #bsrf
<freespeachlamer> is the lecture over?
<bitsNbytes> we just created a small basic interactive CGI-perl script that propmts the user for his
<bitsNbytes> favorite chick type
*** TCL has joined #bsrf
*** ChanServ sets mode: +v TCL
<freespeachlamer> umm can someone send me a log of the lecture?
<bitsNbytes> no ... its just begun
<freespeachlamer> oh
<freespeachlamer> sorry :)
<rek> bitsNbytes: your a little late
<bitsNbytes> now if we don't wanna type all that HTML stuff
<bitsNbytes> OK .. so what do u sugget "rek"
<bitsNbytes> i mean suggest
<rek> what u mean?
<bitsNbytes> yeah .. i know i am late .....??
<bitsNbytes> as long as there are a pair of attentive ears .. it's ok
<rek> well, we had a lot more people, lot of us left @ 1:30...
<rek> i was just makin sure u know.. go on with the lecture
<bitsNbytes> yeah .. iknow and i am sorry (for the umpteenth time now)
*** jacs has quit IRC (Ping timeout: 180 seconds)
<bitsNbytes> ok lemme ask how many of us are familiar with basic unix concepts and cgi scripting
<Yodason> not me =p
*** jacs has joined #bsrf
* rek is
* fatboyjoe is
<bitsNbytes> so i can really move on to REAL stuff
* freespeachlamer is not
<freespeachlamer> but dont worry about me :)
*** freespeachlamer has quit IRC (Quit: )
<bitsNbytes> then let us begin with what we really can do
<bitsNbytes> k let us see this bit complex program i'vbe written
<bitsNbytes> #! /usr/bin/perl -w
*** rek sets mode: +m
*** zwanderer has quit IRC (Quit: bye bye peppe)
<bitsNbytes> # this program loads the cgi module to decide information by web server
<bitsNbytes> use strict;
<rek> bbl have to leave
*** pitpat has quit IRC (Quit: )
*** rek sets mode: -m
*** rek has quit IRC (Quit: )
<bitsNbytes> man .. am i that boring
<Yodason> lol'
<TCL> lol
<sohed> nope, go on
<bitsNbytes> # the strict module ensures your code is in order and within the norms
<bitsNbytes> so we write
<bitsNbytes> use strict;
<bitsNbytes> use CGI qw (:standard escapeHTML);
<bitsNbytes> # now to get a parameter from a form
<bitsNbytes> my $value=param ('PARAM_NAME');
*** Getalife has quit IRC (Read error: 104 (Connection reset by peer))
<bitsNbytes> # and output a document
<bitsNbytes> print header(), start_html("Howdy there!"),
<bitsNbytes> p("U typed: ", tt(escapeHTML($value))),
<bitsNbytes> end_html
<bitsNbytes> some explanation now
<bitsNbytes> CGI scripts are called in two main ways
<bitsNbytes> referred to as "methods" --> not HTTP methods
<bitsNbytes> one is the procedural method.. the other is object oriented
<bitsNbytes> procedural for simple tasks
<bitsNbytes> and object oriented for complex ones
<bitsNbytes> our little program here can be analyzed as follows
*** X has joined #bsrf
*** DigitalFallout has quit IRC (Read error: 104 (Connection reset by peer))
<bitsNbytes> as u might have guessed $anything stands for variable declaration in perl
<X> meaw
<bitsNbytes> perl supports all kinds of data types
*** essex has joined #bsrf
<bitsNbytes> collectively called as "scalar variables"
<bitsNbytes> u no longer have to specify a "type"
<essex> Hi ya
<bitsNbytes> u just say $whatever = somevalue
<bitsNbytes> the "my" reserved word makes that particular variable or parameter
<bitsNbytes> passed to a subroutine "local" to ur specific program
<bitsNbytes> i.e. "my" for locality of reference ..ok
* essex want's to know if anyone knows a good VB decompiler
<bitsNbytes> the header() returns a string content type
<bitsNbytes> followed by the start_html
<bitsNbytes> which returns the string, passed as parameter ,
*** phil has quit IRC (Remote closed the connection)
*** TCL has quit IRC (Quit: BBL)
<bitsNbytes> ok.. now how do we use this program
<bitsNbytes> i hope whatever i said was not too obvious
<bitsNbytes> anywayz
<bitsNbytes> i shall tell u how to get this prog running under UNIX
<bitsNbytes> since I have very lil knowledge bout windowz
<bitsNbytes> generally we place this program on a web server (running APACHE preferrably)
<bitsNbytes> path-> /home/httpd/cgi-bin/program
<bitsNbytes> where program is the program name
*** josh-hamster has joined #bsrf
<bitsNbytes> and then use a browser lynx (for the console) Netscape, Amaya (for Xwin)
<bitsNbytes> get the program running
<bitsNbytes> am i .. making any sense to u ppl
<bitsNbytes> feedbacks plz
<HardW1r3> yeh
<NIN_Dude> yes
<bitsNbytes> OKay!
<bitsNbytes> :)
<bitsNbytes> some of you might be wondering why the HELL use Perl
<bitsNbytes> there are many reasons ..out of which some are
<bitsNbytes> PERL -->Practical  Extract Report Language--> created by Larry Wall
*** BootError has joined #bsrf
<bitsNbytes> is one of the most Powerful Scripting language on earth
<bitsNbytes> apart from being a scripting language .. it also incorpaorates the best of C and C++
<bitsNbytes> thus in short PERL is a superset of scripting lang, C and C++
*** [PhaLanX] has joined #bsrf
<suspect> Who was the only guy to get his work done by Friday ?
<bitsNbytes> the creator and other contributors have now  thought of bringing this power to the Web
<suspect> eh ?
*** ^CoaXiaL^ has quit IRC (Quit: )
<bitsNbytes> suspect: something important ....?
<bitsNbytes> i guess not
* NIN_Dude slaps suspect around a bit with a large trout
<bitsNbytes> so let us move on to error handling
<bitsNbytes> supposing u have trouble tracking down you scripts warnings
<bitsNbytes> and error mesages, or your scripts STDERR output is confusing you
*** kamm has quit IRC (Quit: Leaving)
<bitsNbytes> we use the CGI::Carp module
<bitsNbytes> it is easy to understand if u know C++
<bitsNbytes> it is analogous to using a class called CGI
<bitsNbytes> and the "carp" portion of it
*** essex has quit IRC (Read error: 104 (Connection reset by peer))
<bitsNbytes> i will now create a small prototype
<bitsNbytes> to redirect errors to files of your choice
<bitsNbytes> BEGIN
<bitsNbytes> {
<bitsNbytes> i wonder why nobody has any doubts
<bitsNbytes> guess either i am talkin to myself or i am speaking in ancient phoenetix
<bitsNbytes> anywaz
<bitsNbytes> BEGIN
<bitsNbytes> {
<HardW1r3> im listening
<sohed> me too
* NIN_Dude raises his hand
<bitsNbytes> use CGI::Carp qw(carpout);
*** X is now known as Pr0nKing
<bitsNbytes> yes
*** Pr0nKing is now known as P0rnKing
<bitsNbytes> NIN_Dude:........?
<NIN_Dude> um.. BEGIN?
<NIN_Dude> as in class?
*** fatboyjoe has left #bsrf
* NIN_Dude cries
<bitsNbytes> yes exactly
<NIN_Dude> oh aight
<bitsNbytes> notice the "qw" i am using frequently
<bitsNbytes> it stands for quote words and is a wonderful lil reserved word
<bitsNbytes> OK .. lemme switch back to basics and discuss a small simple perl program to
<bitsNbytes> make things more clearer
*** [PhaLanX] has quit IRC (Quit: )
<bitsNbytes> #! usr/bin/perl -w
<bitsNbytes> print "Identify yourself!";
<bitsNbytes> $name = <STDIN>;
<bitsNbytes> chomp ($name);
<bitsNbytes> if ($name eq "PootieTang")
<bitsNbytes> {
*** jacs has quit IRC (Quit: )
<bitsNbytes> print " Hi there Pootie, You r simply the best!\n";
<bitsNbytes> }
<bitsNbytes> else{
<bitsNbytes> print "Who r U $name\n";
<bitsNbytes> }
<NIN_Dude> chomp?
<NIN_Dude> parsin?
<bitsNbytes> coming .. to it
*** Kamikaze has joined #bsrf
<Kamikaze> what is an stdin, stdout, and stderr?
<NIN_Dude> ok
<NIN_Dude> standard
<NIN_Dude> input
* NIN_Dude shuts up
<Kamikaze> aye...........
<bitsNbytes> chomp cuts out the newline character
<Kamikaze> not really much help but thanks anyway
<bitsNbytes> the entire string is taken along with the newline char also a part of it
<bitsNbytes> so u need to cut it off
<Kamikaze> oh I see the tutorial is underway, sorry for interrupting
<bitsNbytes> there is a function called "chop" also
<NIN_Dude> does chomp cut off the last char or just the newline?
<bitsNbytes> good question NIN
<bitsNbytes> chop does cut off the last char
<bitsNbytes> but not ole chomp
<HardW1r3> dammit this sounds like school
<Kamikaze> lol
<bitsNbytes> it just does away with the  \n
<bitsNbytes> hehe
<bitsNbytes> is it clear ;)
<Kamikaze> really sorry for interrupting here but have you covered website redirection yet?
<bitsNbytes> i have covered basic perl-cgi script and error redirection
<Kamikaze> yeah yeah I know everyones gonna /ignore kamikaze :)
<bitsNbytes> and will come to that just in a few moments
<bitsNbytes> actually i have a hell lot to say
<bitsNbytes> and very lil time i suppose
*** P0rnKing is now known as X
<bitsNbytes> how long do the lectures go on usually
* Kamikaze shuts up and listens up
<bitsNbytes> this is the first time i am delivering one
<Kamikaze> as long as it takes till ppl are satisfactory
<Kamikaze> satisfied^
<bitsNbytes> k..fine
<bitsNbytes> so is the basic structire of a perl prog clear
<sohed> yes
<Kamikaze> nope I missed it :)
*** s4m1k has joined #bsrf
<bitsNbytes> then i revert back to the main topic of discussion
* Kamikaze will really shutup now... promise
*** ExposedTruth has quit IRC (Quit: )
<bitsNbytes> now back to CGI_Perl
<bitsNbytes> man the connection here in India sux
<bitsNbytes> it is crawling
<bitsNbytes> let us have a nice Graphical Interactivity
<Kamikaze> I'm now reading 'Teach yourself C in 21 days'
*** fatboyjoe has joined #bsrf
<bitsNbytes> hmm
<Kamikaze> oops wrong chan
<Kamikaze> shite
*** s4m1k has quit IRC (Quit: [x]chat)
<Kamikaze> it's best if I leave
*** Kamikaze has left #bsrf
<bitsNbytes> any doubts so far
<bitsNbytes> any damn doubt that may be troubling anyone
<NIN_Dude> what if it's not running UNIX?
<bitsNbytes> then anyway u have to find a way to get ur program on the server
<bitsNbytes> the web the right location
<bitsNbytes> the right path i mean
<bitsNbytes> i am not familiar with the procedure for windowz tho
<bitsNbytes> only when it is on the server .. can ur  script be of any use
<bitsNbytes> i have told .. how to get it running on UNIX
<bitsNbytes> ok .. comin to where I left
<bitsNbytes> the function for redirecting error messages
<bitsNbytes> u have to try this  .. code and learn
<bitsNbytes> coz i have made it rigfht now
*** fatboyjoe has left #bsrf
<bitsNbytes> so .. u get my point...;)
<bitsNbytes> BEGIN {
<bitsNbytes> use CGI::Carp qw(carpout)
<bitsNbytes> open (LOG, ">>/var/local/cgi-logs/junk-error")
<bitsNbytes> or die "Unable to append to junk-error: $!\n";
<bitsNbytes> carpout(*LOG);
<bitsNbytes> }
<bitsNbytes> the carpout parameter is to carp-out or blurt out warnings or error returns
<bitsNbytes> die is like exit()
<bitsNbytes> to handle fatal errors
<bitsNbytes> u can use
<bitsNbytes> use CGI::Carp qw(fatalsToBrowser);
<bitsNbytes> die "Fatal Error here!!";
<bitsNbytes> Even if the error occurs before u get the HTTP header out
<bitsNbytes> the module will try to take care of this to avoid the dreaded "500 server error"
<bitsNbytes> how many of u r on a *NIX box
<sohed> now?
<bitsNbytes> yeah
<bitsNbytes> or maybe do use a nix box freq.
*** snider has joined #bsrf
*** ChanServ sets mode: +o snider
<sohed> i use it frequently but not right now
<bitsNbytes> anyway .. even after taking care of errors if you happen to get the 500 server error
<bitsNbytes> it means two things
<bitsNbytes> on a Unix system either you dont have the right permissions
<bitsNbytes> u can check that with the ls -l and assign the script (on the server of course) a 0755 pemission
<bitsNbytes> 0755 if u owned it
*** Satori has joined #bsrf
<bitsNbytes> and 0555 owned by the designated user, assuming u r the SU
<bitsNbytes> SU = super user
*** Dustin has joined #bsrf
<Dustin> kernel question:
<bitsNbytes> also name it with a .cgi extension or .plx ext
<Dustin> the docs in one place say to use to compile 2.4.6
<Dustin> in another it says NOT to use it
<Dustin> what gcc version do i need?
<Dustin> or 2.91.66 ?
<bitsNbytes> tho not necessary some servers identify the ext also
*** suspect has quit IRC (Ping timeout: 180 seconds)
<bitsNbytes> Dustin: The latest
<bitsNbytes> in ur case 2.7 will do
<Dustin> i compiled a while ago with 2.96. something and got lots of errors
<bitsNbytes> i maean
<Dustin> ok
<bitsNbytes> wht errors
<Dustin> even though it says "*gcc is no longer supportes*"
<Dustin> uhm,
<bitsNbytes> yeah module and version dependencies are quite annoying and can be solved best by trial and error
*** zwanderer has joined #bsrf
<Dustin> let me rephrase it: it complied badly
<Dustin> x wouldnt start, lots of cryptic x errors
<bitsNbytes> heheh i know it happens
<bitsNbytes> anyway.. we are here for something else
<bitsNbytes> a lecture is in progress
<Dustin> oh shit
<bitsNbytes> so .. if u plz
*** SkyLemon has joined #bsrf
<bitsNbytes> are the others listening
<SkyLemon> Hello, I need some help: What is the file on linux that you edit to shutdown any services / close ports??
<NIN_Dude> ...
<bitsNbytes> for any queries regarding linux plz post them on messg board or mail me at
*** Jesteruk has joined #bsrf
<bitsNbytes> but plz do not go off the track
*** suspect has joined #bsrf
<Jesteruk> hum...hello peeps
<NIN_Dude> just keep going bits
<bitsNbytes> yeah .. ..
<Jesteruk> damn it i missed the lecture
<bitsNbytes> a simple silly thing
<Jesteruk> never poo poo a lecture dude
* NIN_Dude kills jester
<bitsNbytes> if u want to compile a perl prog
<Jesteruk> ah i see, nah i only write iot for CGI purposes
<bitsNbytes> just use perl -wc cgi-script name=joe number=10
<bitsNbytes> at the command prompt
*** HardW1r3 has quit IRC (Ping timeout: 180 seconds)
*** SkyLemon has quit IRC (Quit: )
<bitsNbytes> this checks the validity of the program as well as runs with the mock input
<Jesteruk> aaah i see..i didnt know that
<Jesteruk> i got an apache web server setup..PHP mySQL support, and perl..i test em that way, didn't know you could simulate it liek that thru DOS prompt
<bitsNbytes> well u know  now ;)
<NIN_Dude> DOS?
<Jesteruk> aye, NIN
*** zwanderer has quit IRC (Quit: off)
<bitsNbytes> he means on the "console"
<NIN_Dude> nm
<NIN_Dude> yeah
<Jesteruk> i mean in that black bit where you type shit
<Jesteruk> ;)
<NIN_Dude> heh...
<bitsNbytes> now how to make our scripts more efficient
<bitsNbytes> this is mainly for Unix audience
<Jesteruk> As long as mine work, i'm happy
*** pitpat has joined #bsrf
<bitsNbytes> Use mod_perl in the Apache server
<pitpat> wow bitsNbytes still going
<Jesteruk> go on dude...
<pitpat> >=)
<bitsNbytes> also edit the httpd.conf as followz
<Jesteruk> I run mine on a unix server, just test em on here, i cant install linux cause i got a software modem, and im not financially able to buy new shit
<Jesteruk> *listenin*
<bitsNbytes> Alias /perl/  /real/path/to/perl/scripts
<bitsNbytes> the above line is not to be typed as it is
<bitsNbytes> it means direct it to ur perl script directory
<bitsNbytes> then in the next line
<Jesteruk> yeah, assign a virtual path to the system path
<bitsNbytes> <Location /perl>
<bitsNbytes> SetHandler perl-script
<bitsNbytes> PerlHandler Apache::Registry
<bitsNbytes> Options ExecCGI
<bitsNbytes> </Location>
<bitsNbytes> leave a line
*** Dustin has quit IRC (Read error: 104 (Connection reset by peer))
<bitsNbytes> PerlModule Apache::Registry
<bitsNbytes> PerlModule CGI
<bitsNbytes> PerlHandler On
<bitsNbytes> this is what u have to type in your /etc/httpd.conf file
<Jesteruk> how exactly down the mod_perl thingy simply scripting?
<bitsNbytes> the PerlModule CGI preloads the CGI module
<Jesteruk> down=does (beer)
*** pitpat has quit IRC (Quit: )
<bitsNbytes> PerlHeader On makes most of your scripts run out of the box with mod_perl
<Jesteruk> hum , i see
<bitsNbytes> now .. perl was designed to be a glue language
<Jesteruk> Recently ive been readin about perl with mySQL, i dun like PHP
<bitsNbytes> that means it provide sscope for embedding code excerpts from other langs or some system calls
<Jesteruk> it has all the cool shit from other languages, and dont have the uncool shit..apparently
<bitsNbytes> you can do so easily
<Jesteruk> i found a few good reads
<Jesteruk> and some shit ones
* NIN_Dude shoots jester in the face
<bitsNbytes> hehehe
<Jesteruk> i fear you now.
<bitsNbytes> now how about formatting lists and tables with HTML shortcuts
<Jesteruk> im listenin
<bitsNbytes> for this purpose the CGI module provides HTML helper functions
*** Norton has joined #bsrf
<bitsNbytes> which, when passed as array refernces(pointers to arrays)
*** TCL has joined #bsrf
*** ChanServ sets mode: +v TCL
<Jesteruk> which does what exactly?
<Jesteruk> oops...
<bitsNbytes> apply themselves to each element of the referenced array ;)
<bitsNbytes> for example
<bitsNbytes> print ol(li(qw(red blue green)])};
<bitsNbytes> sorry the last } is actually a )
<Jesteruk> hum, that looks irish to me
<NIN_Dude> ol
<NIN_Dude> li
<Jesteruk> ah..
<NIN_Dude> qw?
<NIN_Dude> perl?
<Jesteruk> what's perl?
<bitsNbytes> yeah the qw is NEAT
<NIN_Dude> you went over earlier
<NIN_Dude> i forgot
<NIN_Dude> :\
<Jesteruk> well damn it
<bitsNbytes> rather than qoute each individual element passed as parameter
<bitsNbytes> u just say qw(....)
*** TCL has quit IRC (Quit: 3 2 1, 1 2 3, who the heck is haxoring me?!)
<NIN_Dude> so like string?
<bitsNbytes> all the words within the braces get quoted individually
<Jesteruk> aaah
<bitsNbytes> just like in the above line qw (red blue green) means
*** Grendel has quit IRC (Quit: brb)
<bitsNbytes> ("red",  "blue", "green")
<NIN_Dude> yeah
<NIN_Dude> i got it now
*** Grendel has joined #bsrf
<bitsNbytes> ok now the next line is
*** CHAOS has joined #bsrf
*** ChanServ sets mode: +v CHAOS
<bitsNbytes> <OL><LI>red</LI>  <LI>blue</LI> <LI>green</LI></OL>
*** Jesteruk has left #bsrf
<bitsNbytes> let us see how this workz when implemented actually
<CHAOS> www.www.www
<NIN_Dude> what's the print ol(li(qw(red blue green))) do?
<bitsNbytes> coming to it
<NIN_Dude> k
<bitsNbytes> just give me some time
<bitsNbytes> i am having a nasty time with the ****ing connection here
<bitsNbytes> use CGI qw(:standard :html3);
<bitsNbytes> %hash = (
<CHAOS> *yawwwnie!*
<bitsNbytes> "BitsNbytes => ["Alcoholic", "druggie", "nerd"]
*** _ciR_ has quit IRC (Ping timeout: 180 seconds)
<bitsNbytes> "lamest1 => ["Cool", "lame", "funny"]
<bitsNbytes> );
<bitsNbytes> $\ = "\n";
<bitsNbytes> print "<TABLE> <CAPTION>People I know</CAPTION>
*** nskl has joined #bsrf
<bitsNbytes> print Tr (th [qw(people type)]);
<bitsNbytes> for $k (sort keys %hash) {
*** Binary_Dealer has joined #bsrf
<blue|bestbuy> yummy.. I got an italian sub from 7-11
<Binary_Dealer> ppl =)
<Binary_Dealer> What's Up?
*** blue|bestbuy is now known as bluehaze
*** NIN_Dude has quit IRC (Quit: )
<bitsNbytes>    print Tr(th($k), td( [sort @hash($k)}]));
<Binary_Dealer> somebody saw essex
<bitsNbytes> }
<Binary_Dealer> ??
<bluehaze> hehhe
<bluehaze> he was on last night
<Binary_Dealer> yes
<Binary_Dealer> today?
<bitsNbytes> print "</TABLE>;
<bluehaze> dunno
*** NeoMeg has joined #bsrf
<bitsNbytes> this generates text like
<bitsNbytes> <TABLE> <CAPTION> People I have Known</CAPTION>
<bluehaze> is this the perl lecture?
<bitsNbytes> <TR><TH>People </TH>
<bitsNbytes> yep
<bluehaze> ok
*** divinator has joined #bsrf
<bitsNbytes> so u see perl a small perl code can generate a neatly formatted form with lists and tables
*** div|busy has quit IRC (Local kill by divinator (get lost you damn prick))
<bitsNbytes> u can generate a lengthy HTML form
*** divinator has left #bsrf
*** divinator has joined #bsrf
<bitsNbytes> full of lists and tables just by one statemet
*** sohed has quit IRC (Quit: )
*** phanatic has joined #bsrf
<bitsNbytes> print table caption(text), Tr(th [qw(text)])
<bluehaze> i got a question...
<bitsNbytes> map {tr(th($_), td( [sort @($hash)})
<bluehaze> can perl help us get laid?
<bluehaze> cuz I told everyone that it could
<bluehaze> and I just want to be sure
<bitsNbytes> u mean as in ****ed laid
<bluehaze> yes of course
<phanatic> yes
<bitsNbytes> yeah sur
<phanatic> bluehaze has never gotten laid
<bluehaze> cool
<phanatic> in his life
*** HaloScan has quit IRC (Ping timeout: 180 seconds)
<phanatic> back to the pearl
<bluehaze> lol
<Norton> where can i learn to chain proxies??
<bitsNbytes> someone wanted to know redirection to other sites in PERL-CGI
<bitsNbytes> certainly not here and not now .. sorry ;)
*** Leper has joined #bsrf
<bitsNbytes> u use the redirect function
<bitsNbytes> I have a peice of code for that too
<bitsNbytes> i know i have become terrible and painsatakingly annoyingly boring by now
<bitsNbytes> but hey .. that's me aight
<bitsNbytes> so plz bear
<phanatic> hey you're cool enough to do this, how can we complain?
<bitsNbytes> any one from the beginning still hangin around
*** josh-hamster is now known as josh-hamsTERRORIST
<bitsNbytes> (dozin around would do..  :)
<bluehaze> I just got here
<bluehaze> so you gotta start over
<bitsNbytes> nooooooooo
<bluehaze> hehehe
<bitsNbytes> you have to ask questions and i answer them in short .. after  seeing the code that is
<bluehaze> oh
<bitsNbytes> so HERE COMES THE CODE
<bluehaze> well...
<bluehaze> oh
<bluehaze> ok
<phanatic> ok
<bitsNbytes> actually it is quite a skill to write code on the fly and on demand
<bitsNbytes> i am trying to do so right now
*** NeoMeg has quit IRC (Quit: )
<bitsNbytes> anywaz here it comes
*** barcode has joined #bsrf
<bitsNbytes> #! /usr/bin/perl -w
<bitsNbytes> # orebounce - aprogram to redirect browser and set a cookie
*** wHiTE_zoMBIe has joined #bsrf
<bitsNbytes> use CGI qw(:cgi);
<bitsNbytes> $oreo = cookie (- NAME => 'filling',
<Norton> how big is X?
<bitsNbytes>         -VALUE => "Lard Ass",
<bitsNbytes>        -EXPIRES => '+3M',
<bitsNbytes>        -DOMAIN =>  ',');
*** Leper has quit IRC (Quit: Leaving)
<bitsNbytes> $whithergo = "';
*** bluehaze has quit IRC (Quit: 15,1?ShowDowN v12 PrO?1 since 1996: 16,1
<bitsNbytes> print rediredt(-URL => $withergo,
<bitsNbytes>                           -COOKIE => $oreo);
<bitsNbytes> well that was the code
<bitsNbytes> and that would produce something like
<bitsNbytes> Status: 302 Moved Temporarily
*** wHiTE_zoMBIe has quit IRC (Quit: Client Exiting)
<bitsNbytes> Set-Cookie: filling=LardASS; domain=;
<bitsNbytes> expires = DD-MM-YY Time GMT
*** zwanderer has joined #Bsrf
<bitsNbytes> Date: day DD-MM-YY Time GMT
<bitsNbytes> Location:
<bitsNbytes> Content-Type: text/html
<bitsNbytes> B<<balnk line here>>
<bitsNbytes> any questions

End Of Lecture