afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
afuna ([personal profile] afuna) wrote in [site community profile] dw_dev_training 2009-09-25 07:12 am (UTC)

Re: beats head against wall

Aha. Try this instead:

my $layout_path = "\$LJHOME/bin/upgrading/s2layers/$layout_name";
my $cgibin_path = "\$LJHOME/cgi-bin/LJ/S2Theme";

So what was happening was that the perl script has a blank value for $LJHOME, and so it ended up trying to edit a file from root (/bin/upgrading... instead of ~/dw/bin/upgrading...). Backslashing the "$" means that perl no longer considers it as a variable, so passes the $LJHOME string straight to your shell/terminal. The shell then uses its $LJHOME variable (which has the proper value).

Also, good idea on setting it to $LJHOME by default! I should edit my script to do that, instead :)

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting