Loading ...
Sorry, an error occurred while loading the content.

Re: Few queries .. very basic

Expand Messages
  • acummingsus
    ... [ snip stuff about Solaris and if has compiler or not ] ... [ snip ] ... My Slackware 10.1 uses gcc. But cc also works (can use) due to a symlink pointing
    Message 1 of 11 , Sep 1 11:18 PM
    • 0 Attachment
      --- In perl-beginner@yahoogroups.com, Sreeram B S
      <sreeramabsc@y...> wrote:
      >
      >
      > Grier Johnson <grierj@g...> wrote: On 9/1/05, Sreeram B S
      > <sreeramabsc@y...> wrote:
      >
      > > [ snip ]
      [ snip stuff about Solaris and if has compiler or not ]
      > --
      > Grier
      [ snip ]
      > [snip]. I do have gcc in my system. But the Makefile in the
      > module ( ie Perl module for Term::ReadKey), is internally using
      > "cc". I could not trace out as to how to make this Makefile
      > compatible with gcc.
      >
      > Do we have any methods for getting modules from CPAN, which are gcc
      > compatible?

      My Slackware 10.1 uses gcc. But cc also works (can use) due to a
      symlink pointing from cc to gcc. Thus:

      al@p2bs103:~$ which cc
      /usr/bin/cc
      al@p2bs103:~$ which gcc
      /usr/bin/gcc
      al@p2bs103:~$ ls -la /usr/bin/cc
      lrwxrwxrwx 1 root root 3 2005-02-21 22:33 /usr/bin/cc -> gcc*
      al@p2bs103:~$ ls -la /usr/bin/gcc
      lrwxrwxrwx 1 root root 9 2005-02-21 22:33 /usr/bin/gcc -> gcc-3.3.4*
      al@p2bs103:~$

      (yes, an Asus P2BS scsi motherboard version 1.03, Intel BX chipset,
      circa 1998, 1999)

      Unmodified Slackware 10.1
      --

      (to heck with "man ln"). slink (sym link) helper tool I wrote for me
      who never remembers how to make a sym link. (I don't know if you need
      to create a sym link of cc that points to gcc).

      A Perl I wrote, named it slink:

      #!/usr/bin/perl -w

      # ln -s /usr/local/Adobe/Acrobat7.0/bin/acroread acroread
      use strict;

      print <<STUF;

      Creates a sym link
      Useage: must be root; cd to where want the link to reside;
      (usually in the search path)
      at prompt enter: /usr/local/bin/perl perl
      done in /usr/bin that makes
      /usr/bin/perl point to /usr/local/bin/perl
      (runs ln -s /path/dir/file_name file_name)
      which gets the command syntax correct for me

      OR enter q to exit/cancel
      STUF
      print "\nenter /path/file_name file_name: ";
      chomp(my $path_w_name = <STDIN>);
      while (1) {
      last if $path_w_name =~ /q/;
      system("ln -s $path_w_name");
      # print "$path_w_name";
      last;
      }
      if ($path_w_name =~ /q/) {
      print "\ncanceled\n"; }
      print "\n";
      # end

      --
      Alan.
    • acummingsus
      ... [ snip ] ... last if $path_w_name =~ / bq b/; # better in case of q within string [ snip ] ... if ($path_w_name =~ / bq b/) { # better in case of q within
      Message 2 of 11 , Sep 2 12:33 AM
      • 0 Attachment
        --- In perl-beginner@yahoogroups.com, "acummingsus" <acelists@g...> wrote:
        [ snip ]
        > last if $path_w_name =~ /q/;

        last if $path_w_name =~ /\bq\b/; # better in case of q within string

        [ snip ]
        > if ($path_w_name =~ /q/) {

        if ($path_w_name =~ /\bq\b/) { # better in case of q within string

        Not best. Not yet anyways. Good enuff works for me.

        --
        Alan.
      Your message has been successfully submitted and would be delivered to recipients shortly.