
adiezsoto
New User
Jul 4, 2005, 11:27 PM
Post #1 of 2
(413 views)
|
|
Need help with glob
|
Can't Post
|
|
Hi all, Having problems with glob function. We are involved in a migration of an application from perl 5.005_03 to perl 5.6.1. This is an old and critic app code, so we don't want to modify it. In the application, we are reading from a database a string, containing an environment variable (e.g. $PATH), we store the value read into a perl structure and then we use glob to expand the environment variable ( I know that this is not the right use of glob) $a_variable = glob $structure->value; $command ="value $a_variable"; When executing this in perl 5.005_03 we have in the $command the environment variable expanded. If we execute in perl 5.6.1 we have the string $PATH in $command="value $PATH". We can solve this in the right way using reg exp to substitute the $PATH. But we don't want to change the code. The problem seem to be related to the change in glob implementation from perl 5.6.0, now perl is not calling to glob function from the unix operating system, it's calling a new implementation of glob from perl's core. Do you know any way of maintain backwards compatibility ??? any way of still calling to glob from Unix without changing the code ??? Thanks in advance
|