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