The following is an example of how I have done it in the past:
#!/usr/bin/perl -w use strict; use File::Glob qw(:glob); my $dirstring = q(~user); my $newdirstring = File::Glob::bsd_glob( $dirstring, GLOB_TILDE | GLOB_ERR ); print <<RESULTS; Old directory string: $dirstring New directory string: $newdirstring RESULTS
Hope that helps.
In reply to Re: ~username expansion
by atcroft
in thread ~username expansion
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |