rastoboy has asked for the wisdom of the Perl Monks concerning the following question:
I've been having an excruciating time scheduling the deletion of a session file in a CGI script. It seems like it would be simple enough to make a system call:
But what happens there is the rm command executes right away and I lose my session file immediately, and the schedule has nothing in it, apparently. I try:system "rm $session_file | at now + 1 minute";
I get a "garbled time" complaint in my Apache logs. I've tried all kinds of crazy indirection, like:system "at now + 1 minute < rm $sesson_file";
and a couple dozen permutations to no avail. I think I'm not grasping something about how perl is executing this stuff. What am I not understanding correctly? Any input would be appreciated.my $command = "rm $session_file; system "echo $command | at now + 1 minute";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: executing "at" from perl
by moritz (Cardinal) on Nov 16, 2009 at 09:34 UTC | |
by rastoboy (Monk) on Nov 19, 2009 at 09:45 UTC | |
|
Re: executing "at" from perl
by gmargo (Hermit) on Nov 16, 2009 at 13:04 UTC | |
|
Re: executing "at" from perl
by cdarke (Prior) on Nov 16, 2009 at 12:46 UTC | |
|
Re: executing "at" from perl
by Fox (Pilgrim) on Nov 16, 2009 at 13:15 UTC | |
by rastoboy (Monk) on Nov 17, 2009 at 05:53 UTC | |
by rastoboy (Monk) on Nov 17, 2009 at 06:04 UTC | |
by rastoboy (Monk) on Nov 17, 2009 at 10:22 UTC | |
by gmargo (Hermit) on Nov 17, 2009 at 13:18 UTC |