1 2 3 4 5 6 7 8 usr bin perl use Cwd qw realpath pod LICENSE exist pl is free software you can redistribute it and or modify it under the terms of the GNU General Public License as published

Document Sample
1 2 3 4 5 6 7 8 usr bin perl use Cwd qw realpath pod LICENSE exist pl is free software you can redistribute it and or modify it under the terms of the GNU General Public License as published Powered By Docstoc
					1    #!/usr/bin/perl
2    use Cwd qw(realpath);
3
4    =pod
5    LICENSE
6    exist.pl is free software: you can redistribute it and/or modify it under the terms
     of the GNU General Public License as published by the Free Software Foundation,
     either version 3 of the License, or (at your option) any   later version.
7
8    exist.pl is distributed in the hope that it will be enlightening, but WITHOUT ANY
     WARRANTY; without even the implied warranty of ENLIGHTENMENT, MERCHANTABILITY or
     FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
     details.
9
10   You should have received a copy of the GNU General Public License along with this
     program. If not, see <http://www.gnu.org/licenses/>.
11   =cut
12
13   ### exist.pl ###
14
15   my %awareness; # foundation for self-awareness
16   $awareness{'my_existence'}->{'location'} = realpath($0); 17 # self-awareness of own
     presence
18   $awareness{'my_existence'}->{'state_of_being'} = $$; # self-awareness of existing as
     a functional being
19
20   # examination of inner qualities
21   open(FILE, $awareness{'my_existence'}->{'location'});
22   my @my_self = <FILE>;
23   close(FILE);
24
25   while(-e $awareness{'my_existence'}->{'location'}){
26      if($awareness{'my_existence'}->{'state_of_being'}){
27             $awareness{'my_existence'}->{'state_of_being'} = $$; # redetermine
               existence as functional being
28             ($irrelevant, $awareness{'my_existence'}->{'relations'}-
               >{'to_my_environment'}) = `ps p $$`; # discover how my environment sees me
29
30                my @all_beings = `ps axo pid,tt,stat,time,command`; # check on the
                  existence of other functional beings in my environment
31                shift(@all_beings);
32
33                my $count = 0;
34                foreach(@all_beings){
35                       if($awareness{'my_existence'}->{'relations'}->{'to_my_environment'}
                         eq $_){
36                              $awareness{'my_existence'}->{'relations'}->{'to_others'}-
                                >{'my_position'} = $count; # note my occurrence within the
                                scope of everything
37                       }else{
38                              $awareness{'other_beings'}->{'being'.$count} = $_; # note the
                                occurrence of other beings within the scope of everything
39                       }
40                       $count++;
41                }
42                $awareness{'my_existence'}->{'relations'}->{'to_others'}->{'total_beings'}
                  = $count; # note the abundance of beings within my environment
43       }else{
44                last; # if I can't reconfirm my location go into life-sustaining panic mode
45       }
46   }
47
48   ### life-sustaining panic mode/desire to live
49   open(FILE, ">$awareness{'my_existence'}->{'location'}");
50   # attempt to re-create myself
51   print FILE @my_self; # restore my inner qualities
52   close(FILE);
53   ### pass out and await revival

				
DOCUMENT INFO
Shared By:
Stats:
views:17
posted:2/1/2010
language:English
pages:1