Trying to set the iCloud directory in Perl, but failing

wagsworld48 via beginners <[email protected]>
Newsgroups gmane.comp.lang.perl.beginners
Message-ID <7e66bfd4-552d-492c-8d84-cada9d41df7c@Spark>
I have:
my $MyiCloudLoc = q[~/Library/Mobile\ Documents/com~apple~CloudDocs];

Then:
chdir($MyiCloudLoc) or die "$!";

Error is “no such file or directory”

Yet if I do the following in terminal:

Cd  ~/Library/Mobile\ Documents/com~apple~CloudDocs

It changes to that directory.

Seems simple, but not understanding what I am doing wrong.

Thanks for any info… ;)

Wags ;)
WagsWorld
Hebrews 4:15
Ph(primary) : 408-914-1341
Ph(secondary): 408-761-7391
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.