diff options
author | Matt Strapp <matt@mattstrapp.net> | 2021-09-25 16:00:51 -0500 |
---|---|---|
committer | Matt Strapp <matt@mattstrapp.net> | 2021-09-25 16:00:51 -0500 |
commit | 3aafb02dc4ab079fc58b555a6808f302539c7a49 (patch) | |
tree | 3477f834297df7e7a3b705fd8ddca0c4dab3348a /csci5271/hw1/hw1p2a.pl | |
parent | Edit resume links (diff) | |
download | homework-3aafb02dc4ab079fc58b555a6808f302539c7a49.tar homework-3aafb02dc4ab079fc58b555a6808f302539c7a49.tar.gz homework-3aafb02dc4ab079fc58b555a6808f302539c7a49.tar.bz2 homework-3aafb02dc4ab079fc58b555a6808f302539c7a49.tar.lz homework-3aafb02dc4ab079fc58b555a6808f302539c7a49.tar.xz homework-3aafb02dc4ab079fc58b555a6808f302539c7a49.tar.zst homework-3aafb02dc4ab079fc58b555a6808f302539c7a49.zip |
Start hw1
Diffstat (limited to 'csci5271/hw1/hw1p2a.pl')
-rwxr-xr-x | csci5271/hw1/hw1p2a.pl | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/csci5271/hw1/hw1p2a.pl b/csci5271/hw1/hw1p2a.pl new file mode 100755 index 0000000..a8bfe2e --- /dev/null +++ b/csci5271/hw1/hw1p2a.pl @@ -0,0 +1,12 @@ +#!/usr/bin/perl +print "Content-Type: text/html\r\n\r\n"; +print "<HTML><BODY>\n"; +($field_name, $username_to_look_for) = split(/=/, <>); +chomp $username_to_look_for; +$result = `last -1000 | grep $username_to_look_for`; +if ($result) { +print "$username_to_look_for has logged in recently.\n"; +} else { +print "$username_to_look_for has NOT logged in recently.\n"; +} +print "</BODY></HTML>\n";
\ No newline at end of file |