in reply to DESTROY on CTRL+C
Put this in front of your script:
$SIG{INT} = sub { print "I'll die\n"; exit 1; };
and try it again. You'll get the building blocks.
UPDATE: In http://perldoc.perl.org/perlvar.html search for SIG.
UPDATE2: Have a look at File::Temp. File system handling on unixoid operating systems do have a nice feature. You can open a file (result is a opened filehandle) and directly afterwards unlink the file. This has the result that you have a file you can write to and read from but which can't be seen in the directory listing. The better: As soon as you close the file explicitly in your program or implicitly by killing the program the file gets deleted as there is no reference to it anymore. IMHO this would be the right approach in your object.
McA
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: DESTROY on CTRL+C
by Happy-the-monk (Canon) on Aug 29, 2013 at 12:50 UTC | |
by gri6507 (Deacon) on Aug 29, 2013 at 13:08 UTC | |
by McA (Priest) on Aug 29, 2013 at 13:51 UTC | |
by vsespb (Chaplain) on Aug 29, 2013 at 19:22 UTC | |
by McA (Priest) on Aug 29, 2013 at 13:00 UTC | |
|
Re^2: DESTROY on CTRL+C
by daxim (Curate) on Aug 29, 2013 at 12:58 UTC | |
by McA (Priest) on Aug 29, 2013 at 13:05 UTC |