mathomp4 has asked for the wisdom of the Perl Monks concerning the following question:
Oh Mighty Gurus,
This is a Perl 101 question for sure, but I don't know what this code/operator/action is called, so I can't look up on internet what it is and find out what it does!
To wit, I have some code that, eventually, has a variable called $bcsdir that has the value of a long path-like string:
Now, that last node doesn't actually exist on disk, but .../Ganymed-4_0_Reynolds/CF0180x6C_DE0360xPE0180 does. In the code, I then see this operate on $bcsdir:/part/of/path/Ganymed-4_0/Ganymed-4_0_Reynolds/CF0180x6C
and that seems to expand out the path...or something? Because after that call, $bcsdir now has:$bcsdir = (<${bcsdir}*>)[0];
The variable is longer and exists as a path!/part/of/path/Ganymed-4_0/Ganymed-4_0_Reynolds/CF0180x6C_DE0360xPE0180
So, in trying to help me learn how to hack Perl: what is happening and what is it called? Is this some magic I should learn? :)
Thanks, Matt
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: What is this Perlism called...and what does it do?
by LanX (Saint) on Oct 28, 2021 at 19:54 UTC | |
|
Re: What is this Perlism called...and what does it do?
by choroba (Cardinal) on Oct 28, 2021 at 21:08 UTC | |
|
Re: What is this Perlism called...and what does it do?
by hippo (Archbishop) on Oct 28, 2021 at 21:41 UTC | |
|
Re: What is this Perlism called...and what does it do?
by mathomp4 (Novice) on Oct 29, 2021 at 12:03 UTC | |
by LanX (Saint) on Oct 29, 2021 at 14:24 UTC | |
|
Re: What is this Perlism called...and what does it do?
by Anonymous Monk on Oct 29, 2021 at 16:07 UTC |