I have a bit of code I've used more than once when programming in Windows. I often suspect there is a more elegant single line that will accomplish the same thing
my $appPath=`echo %localappdata%`; chomp $appPath; my $applicationPath="$appPath".'\someApplication\';
Is there a way to compress this into fewer steps?
Thanks
EDIT
After the advice of the wise and patient monks, I was able to replace those 3 lines of code with one:
my $appPath = "$ENV{localappdata}\\someApplication";
NICE.
In reply to Chomp, Concatenation and paths by Mad_Mac
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |