Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Trying to set the iCloud directory in Perl, but failing

0 views
Skip to first unread message

wagsworld48 via beginners

unread,
Aug 13, 2021, 5:45:04 PM8/13/21
to Beginners Perl
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

wagsworld48 via beginners

unread,
Aug 13, 2021, 8:45:04 PM8/13/21
to begi...@perl.org, Ken N
Txs. Knew it had to be something simple. 

I appreciate the help.

Have a great weekend… ;)

Wags ;)
WagsWorld
Hebrews 4:15
Ph(primary) : 408-914-1341
Ph(secondary): 408-761-7391
On Aug 13, 2021, 17:03 -0700, Ken N <wa...@purpleEmail.com>, wrote:
I remember I once connected to iCloud from perl via their webdav interface.


On 2021/8/14 7:56 上午, Robert Wohlfarth wrote:
The leading tilde ("~") is the problem. It's specific to the shell. Perl
doesn't recognize it. Perl treats that first tilde as a directory. The
error is telling you that a directory named "~" doesn't exist.

--
Ken N
https://blog.hoxblue.com/

--
To unsubscribe, e-mail: beginners-...@perl.org
For additional commands, e-mail: beginne...@perl.org
http://learn.perl.org/


0 new messages