in reply to Re: broke my perl? :(
in thread broke my perl? :(

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...

Replies are listed 'Best First'.
Re^3: broke my perl? :(
by FloydATC (Deacon) on Aug 25, 2010 at 16:04 UTC
    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.
Re^3: broke my perl? :(
by JavaFan (Canon) on Aug 25, 2010 at 10:03 UTC
    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.

        If apt-get depends on perl, maybe the lower level program dpkg doesn't.

        Downloading the .deb package manually then installing stuff with dpkg -i $deb_file has helped me to repair some Debian systems where apt wouldn't work anymore.

        Perl 6 - links to (nearly) everything that is Perl 6.