I am not sure about a physical class.
I have not yet forgotten my last bad experience when no one turned up.
Moreover I am also not sure about the modalities.
But e-mail classes are okay.
We will see some simple regex code today.
Let us look for the name girish in /etc/passwd fine.
$ cat findgirish.pl
#!/usr/bin/perl
open F,"/etc/passwd";
for(<F>) {
if(/girish/) {
print "Found Girish . $_ \n";
}
}
close F;
Actually open should be done like this:
open H, "file" or die "could not open file";
Anyway you can write a simple conditional set like this:
if(/fo/) {
}elsif(/bar/) {
} elsif(/fat/) {
}
perldoc perlre
will give you a good idea.
Regexes are a complex topic and it took me close to 3 months to master it.
You can pickup the UNIX regex pattern set from the flex man page as well.
-Girish
--
Gayatri Hitech
http://gayatri-hitech.com
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc