Very odd. Thinking to step ouside of Linux, I tested this on Windows. It appears to have worked correctly for me as well.
SKMDSK06::T:\>perl -V | findstr uname
uname='Win32 strawberry-perl 5.32.0.1 #1 Sun Aug 2 19:46:04 2020
+x64'
SKMDSK06::T:\>set user
USERDOMAIN=SKMDSK06
USERDOMAIN_ROAMINGPROFILE=SKMDSK06
USERNAME=Steve
USERPROFILE=C:\Users\Steve
SKMDSK06::T:\>type test01.pl
use strict;
use Path::Tiny;
my $path = path("/a/b/c/$ENV{USER}")->absolute;
print "$path\n";
SKMDSK06::T:\>perl test01.pl
T:/a/b/c
SKMDSK06::T:\>
Not sure that this helps any, but there it is.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|