Re: How to determine the file type of a file passed as an input to the perl program ?



On Thu, Nov 20, 2008 at 6:59 PM, Raymond Wan <rwan@xxxxxxxxxxxxxxxxxxx>wrote:


Hi Amit,


Amit Saxena wrote:

On Thu, Nov 20, 2008 at 6:20 PM, Raymond Wan <rwan@xxxxxxxxxxxxxxxxxxx
wrote:


Hi Amit,


Amit Saxena wrote:



Using external modules in the home directory is not disallowed, in fact
I
keep using few CPAN modules from my home directory like PerlTidy etc.

However the reason for which I want to use an inbuilt module because I
need
not ask sysadmin people to download and install an external module just
for
my requirement.




I'm sorry, but I don't understand what you mean here... You DO have
modules in your home directory, but you don't want to ask the sysadmins
to
download them for you? How did you get those modules in your home
directory, then?

By installing them in your home directory, I also mean that *you*
download
them yourself. At first, I thought the sysadmins are preventing you from
installing for strange reasons (disk quota, etc.). So, in the absence of
someone giving you an answer to your other question, you might want to
look
into how to do an install in your home directory. Check this out:

http://servers.digitaldaze.com/extensions/perl/modules.html
http://theoryx5.uwinnipeg.ca/CPAN/perl/lib/CPAN.html

On the first page, scroll down to the bottom to where it talks about
CPAN.pm. If that doesn't work, then download the source and compile as
the
top of the first link says.

Of course...this is only if no one else can help you with your original
question; I've certainly installed modules in my home directory without
ever
bothering the system administrator at all.

And yes, using them should be faster than doing "system ("file")"...

Ray





Hi Ray,

There seems to be some confusion here, let me resolve it.

I have already installed some Perl modules in my home directory using the
procedure which is same as what's mentioned in those links as well.

However I use these modules just to explore a new functionality or to test
whether there is any new module which can serve better than the existing
one.

Excluding the user's home directories, any changes to the UNIX system for
databases, application languages, system settings are carefully monitored
and any request for the same goes through a channel where the requester
needs to convince a team about why we need changes in the development
environment.

That's why I was exploring if there is already some built-in module, I can
use and explore that.




Sorry, but you haven't cleared things up any better for me. :-) Maybe you
can try one more time with me...

If you use the procedures listed in those links, you will be able to:

a) install Perl modules in your home directory,
b) allow you to explore new functionality and to test which option is
best,
c) remove or update them as you choose, and
c) NOT make any changes to the Unix system because only *you* can use them
and you are not modifying any of the system's settings by installing a Perl
module

I get this feeling that you think that installing a module is "making a
change to the system that would upset a system administrator". You really
aren't (well, assuming you are on a Unix system). The changes you are
making are really within your home directory -- that is all (and permissions
will disallow you from making changes outside the home directory, even if
you tried).

Don't get me wrong...if you told me that you wanted a built-in module
because "you just want to and it is none of my business", then I'll stop.
:-) But it sounds to me that you think installing a module locally [in
your home directory] will have any change on the system *outside* of your
home directory...it won't. The only reason why I would think a sysadmin
would discourage it is if 200 students (say) installed the same module, then
200 times the diskspace would be used...multiply this by the number of
modules the class needs; for this reason, I can see why a sysadmin would
discourage even a local installation...

Ray



Hi Ray,

What you have interpreted is not at all correct.

I am fully aware that installing a module in my UNIX account home directory
will not have any affect on the overall system and the changes will be
applicable with in my account only.

What I meant was that I always prefer to look for built-in module instead of
external module from CPAN.

Generally the process goes like this :-

1. I download and install modules on CPAN so as to avail a feature which is
not available in the standard Perl distribution.

2. Once satisfied with the module, I raise a request to the system
administrators to install that module in Perl standard location so that
other developer's like me can use that by accessing it from the standard
Perl library location and they don't need to install it in their respective
home directories.

3. In continuation with the earlier point, generally it's tough to convince
the team which decides on which all system level changes like external Perl
modules, will be installed.

Just to avoid the effort that is taken to convince the authorities, I want
to skip this entire exercise by exploring whether a built-in Perl module is
there which does the same thing.

I hope you get it this time, if not, I am ready to explain it ;-).


Thanks & Regards,
Amit Saxena


Relevant Pages

  • Re: VS2005 crashing when trying to Build a solution stored on a network drive
    ... VS2005 will have seen your local hard drive as the home directory. ... transferring entire Project folders including all supporting files. ... new CORRECTLY CONFIGURED location, then import all your code into the new ... that when you install it and run for the first time, ...
    (microsoft.public.vsnet.general)
  • Re: download ubuntu8.04 iso
    ... well you cant really download the *.iso file from synaptic..you will ... ownership of your home directory. ... I recently downloaded updates for my Archlinux install, ... going to be upgraded to KDE4. ...
    (Ubuntu)
  • Re: What I do for a new machine?
    ... On Sat, Dec 3, 2011 at 7:42 AM, Avi Greenbury wrote: ... you really have plans to install 10GB worth of stuff in /opt? ... /home and the / are the partitions. ... I also store my backup of my home directory there ...
    (Ubuntu)
  • Re: Installing binaries
    ... So in the case of perl ... I usually just download RPMs into my home directory, install them from ...
    (Fedora)
  • Re: Perl Newbie question about upgrade from Perl 5.8.8 to 5.10
    ... I am new to programming and Perl as well. ... you were logged in as root when you built and installed this ... directory in your root home directory, ... it and install it there. ...
    (perl.beginners)