• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 167
  • Last Modified:

5 questions


I have the following 5 questions/clarifications

 1) how to change permissions for a file in windows using PERL?
 for eg
 dir1 has 777 permissions
 file1 has 666 or 444 or 755 or whatever permissons
 I want to change file1 to 777
 I tried chmod (777 , "file1")  
 and chmod (0777 , "file1")
 both didnt work--- please advise

 2) Is there a sendmail program for windows ?

 where can I download it ??
 I want to use it as  $MAIL = "/usr/bin/sendmail"  -- as in unix ...

 3) I have two computers connected on network  -- windows 98

 I have apache win95 version  running in both of them ..

Is it possible to send email from one computer to another computer ..

 I have configured their IPs as and
 so is it possible to send a mail from  to  somebody@

 and the somebody@ must be able to use a browser to read the mail ...

 If it is not possible in windows to windows machines  is it atleast possible in windows to linux machine .. (I mean one machine running linux and the other windows both connected on network)

Is there any sofware , modules I have to install etc ..

If it is possible at all .. what will be the pop and smtp configurations etc

4) In PERL what is the  windows equivalent for unix ...

1) $$ and

2) $!

5) Is there any website which compares the progamming aspects of programming PERL in windows and UNIX ?

christopher sagayam
christopher sagayam
  • 10
  • 3
1 Solution
Are you using ActiveState Perl on the windows machines ?
1) Win32::FileSecurity;

3) You need a mail server (SMTP/POP) accessible on your network
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

christopher sagayamAuthor Commented:
is there a mail server available for download .. can I install them in my machine .. either linux or windows
christopher sagayamAuthor Commented:
which module cotains



First of all, I recommend using ActiveState perl for windows environment. (www.activestate.com)

To install Win32::FileSecurity you can do this with PPM (Perl Package Manager):

PPM> install Win32-FileSecurity
Install package 'Win32-FileSecurity?' (y/N): y
....'Retrieving package 'Win32-FileSecurity
Installing C:\Perl522\site\lib\auto\Win32\FileSecurity\FileSecurity.dll
Installing C:\Perl522\site\lib\auto\Win32\FileSecurity\FileSecurity.exp
Installing C:\Perl522\site\lib\auto\Win32\FileSecurity\FileSecurity.lib
Installing C:\Perl522\html\lib\Win32\FileSecurity.html
Installing C:\Perl522\htmlhelp\pkg-Win32-FileSecurity.chm
Installing C:\Perl522\htmlhelp\pkg-Win32-FileSecurity.hhc
Installing C:\Perl522\site\lib\Win32\FileSecurity.pm
Writing C:\Perl522\site\lib\auto\Win32\FileSecurity\.packlist

You can see which packages are available for ActiveState perl in:


To deal with mail issues, you can do

PPM> install MailTools

Then check the ActivePerl->OnlineDocumentation

You will see lots of new mail stuff like:


> 2) Is there a sendmail program for windows ?

There is a program called "blat" for windows I know of, but when I tried using it , it crashed in several circumstances.

What works best is using Mail::Sender.pm, as discussed in:


If you would like to work with it, tell me and I will post more info on this, as configuring this could be somewhat tricky.

> 5) Is there any website which compares the progamming aspects of programming PERL in windows and UNIX ?

When you install ActiveState Perl, the online documentation installed contains the following FAQs, dealing with programming perl on windows platforms.  

    perlwin32faq: Overview of the Win32 Perl FAQ (this document) (Updated: 3/3/99)
    perlwin32faq1: Availability and Installation
    perlwin32faq2: PerlIS
    perlwin32faq3: Documentation and Support
    perlwin32faq4: Windows NT and Windows 95 (Updated: 3/11/99)
    perlwin32faq5: Implementation Quirks
    perlwin32faq6: Web Server Configuration and Troubleshooting
    perlwin32faq7: Web Programming (CGI and PerlIS)
    perlwin32faq8: General programming
    perlwin32faq9: Modules/sample scripts (Updated: 3/11/99)
    perlwin32faq10: Embedding and Extending
    perlwin32faq11: Using PPM to install modules (Updated: 3/3/99)
    perlwin32faq12: Using OLE with Perl  (Updated: 3/11/99)

Note that there are all sorts of quirks in the windows95 implementation.

Also note that I have not worked with win98, and all the info I am commenting is tested on WinNT plaform.

You can make the linux machine a mail server for itself and the other 2 windows machines on the network.

To get the linux machine to be your mail-server, it needs to handle
the protocols SMTP POP3 IMAP.

My platform is redhat-linux 5.1, so the info below may be specific
to redhat linux.

Redhat linux installation contains support for these protocols,
so there is no need for you to get 3rd party software.

You can do telnet to the linux box to ports 25 - STMP, 110 - POP3
and see what answer you are getting.

You can try configuring OUTLOOK / OUTLOOK express against the
linux box which can serve as an SMTP/POP3 server.

The mail accounts are someuser@linuxbox (unix users on the linux box),
to which you can connect from outlook / outlook express, or your own
custom mail client software running on the windows machines
(written in perl for example).

If you are having trouble, try looking at
on the linux box.

You can also use
   /usr/sbin/tcpdump port 110  
   /usr/sbin/tcpdump port 25

To see network traffic on specific ports of your linux box.

If you have redhat 6.1, look at


(search for POP3 on this page)


BTW- How are you getting along ?
Hello .... how are you doing ???

Have a look at:


I have a similar setup to yours:
A linux (redhat 5.1) box acting as a mail server.

Three windows machines, reading mail using outlook express.

christopher sagayamAuthor Commented:
Do you know of any web based admin script ?

For adding pop3 users ?

For adding system users etc ?

email  me at christopher_sagx@yahoo.com
You could write a perl-CGI that would accept input and call the linux command "adduser" to create new unix users.
 Once a unix user is added, he will be able to receive mail.
 I am assuming you don't need this to be highly secure.

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 10
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now