Topic awaiting preservation: RegEx/Perl (Page 1 of 1) |
|
---|---|
Bipolar (III) Inmate From: Berlin, Germany |
posted 03-04-2005 17:45
Hi there! code: $ENV{'SCRIPT_FILENAME'} =~ m/[^\/\\]+$/; # /../CGI-Executables/index.cgi
|
Paranoid (IV) Inmate From: Madison, Indiana, USA |
posted 03-04-2005 17:52
Hi u-neek, code: ($script_dir) - ( $ENV{'SCRIPT_FILENAME'} =~ m:([^/\\]+)$:);
code: ($script_dir) - ( $ENV{'SCRIPT_FILENAME'} =~ m:^(.*)/[^/\\]+$:); |
Paranoid (IV) Inmate From: Madison, Indiana, USA |
posted 03-04-2005 22:46 |
Bipolar (III) Inmate From: Berlin, Germany |
posted 03-05-2005 14:52
Thank you for your quick response. code: my ($script_dir) = (($0 or $ENV{'SCRIPT_FILENAME'}) =~ m{^(.*/)[^/\\]+$});
|