in reply to broke my perl? :(

That looks like your /usr/bin/perl is actually a script which starts with #!/gsc/bin/perl, and /gsc/bin/perl doesn't exists.

Replies are listed 'Best First'.
Re^2: broke my perl? :(
by megnetz (Novice) on Aug 25, 2010 at 09:57 UTC
    I think I understand what I did! In trying to move my script to the perl PATH I thought /usr/bin/perl was a directory and not the actual perl. So I wrote something like:

    cp my_script /usr/bin/perl

    Thus removing my perl and placing my_script there instead. So I guess reinstalling ubuntu is the way to go then...
      Next time, if you want to plop a frequently used script in your path, consider placing it in the '/usr/local/bin' directory. This is a good place for non-standard tools and makes it easier for you to bring them with you when you migrate.

      -- Time flies when you don't know what you're doing
        Thanks for the tip! I already made a new directory and added it to my $PATH to make sure this doesn't happen again.
      Reinstalling the OS just because you lost a file? Just install the package. Or copy it from a live CD. Or another ubuntu installation. Or compile your own perl. Or, gasp, restore from backup.

        I think on Debian (and thus Ubuntu), apt-get and some other system-relevant programs still rely on /usr/bin/perl working. This would mean that installing any package likely won't work on that system.

        I think that Debian plans/planned to remove the dependency on perl for apt-get, so maybe that will work in a recent version of Debian/Ubuntu. Restoring from backup would be the approach that's more likely to work.