Out of Topic :-Any perl training institutes in Bangalore

2004-08-09 Thread Anand . V
Hi All,

I am new to perl. I would like to know if any one of you, aware of any
training institutes in bangalore for perl training.

I am also learning on my own, especially this group has been highly helpfull
for beginners like me, but keeping in view of  vastness of perl and limited
time that we have for automation, i am enquiring about this.

Thanks in Advance

Regards
Anand



doubt in Definition of sub routine.

2004-08-05 Thread Anand . V
Hi All,

I am using code written by some one else. I didn't understand the difference
between these subroutines, the way they were defined.

1. sub addToLog  {  Some code  }Any specific reason where we should
not use braces ??
2. sub displayEnv( ) {}Any specific reason why we should
use braces  ??
3. sub trim($)   {}Any specific reason why we should
use a brace with a $ sign  in it ??

Could some one specify reason when to use braces and when not to use .
Replies are highly appreciated and thanks in advance for your help.

Regards
Anand



How do it do find and replace specific words using perl

2004-07-23 Thread Anand . V
Hi All,

Could some help me in doing this using perl.

1. Open a text file (Adapter.data ) with following contents.

HEADER.JMSDestination=sample_dataQ
HEADER.JMSDeliveryMode=Persistent
HEADER.JMSType=Data
HEADER.JMSCorrelationID=2
HEADER.JMSPriority=4

PROPERTY.STRING.Data_Type=Purchase_Order
PROPERTY.STRING.Data_Qualifier=Update
PROPERTY.STRING.Data_Delivery_Mode=Notification
PROPERTY.STRING.Data_Format=OPEN
PROPERTY.LONG.TimeToLive=200
PROPERTY.STRING.Src_Client_Addr=godavari::SendToAdapter
PROPERTY.STRING.Src_Client_Version=1.0
PROPERTY.STRING.Src_Client_Type=TestHarness

specific.Directory=/home/anand/Demo/ADK/temp/sendToAdapter
specific.RequestTimeOut=5

specific.DataFile=/home/anand/Demo/ADK/temp/sendToAdapter/someFileToSend.dat


2. Replace sample_dataQ with Adapter_dataQ and replace someFileToSend.dat
with data.txt


Any login to do this with brief syntax is highly appreciated.

Thanks in advance

Anand




RE: How do it do find and replace specific words using perl

2004-07-23 Thread Anand . V

Hi James,

I was trying this but not sure where it is going wrong ...

use strict;
use File::Copy;

my $dest_file = sendToAdapter.properties;
my $searchstr = 'sample';
my $repstr= 'FileAdapter';

open(FL, $dest_file) or die(Doh - $!);

$^I = '~';
s/$searchstr/$repstr/g while FL;

close(FL);

Would appreciate if you could help me.

Thanks  Regards,
Anand




-Original Message-
From: James Edward Gray II [mailto:[EMAIL PROTECTED]
Sent: Friday, July 23, 2004 6:18 PM
To: [EMAIL PROTECTED]
Subject: Re: How do it do find and replace specific words using perl 


On Jul 23, 2004, at 5:13 AM, [EMAIL PROTECTED] wrote:

 Hi All,

Hello.

 Could some help me in doing this using perl.

We will help, yes, but we probably won't write it for you.  What have 
you tried.  Where are you stuck?  Show us some code.

James


FTPing of files between remote servers.

2004-07-20 Thread Anand . V
Hi All,

I am using following code to transfer a file from remote host to local
system.

sub transferEJSFiles{

$ftp = Net::FTP-new($sourceServer, Timeout = 30) or die Can't
contact $sourceServer: $!;  

$ftp-login($sourceUser,$sourcePassword) or die Can't login
($sourceUser):, $ftp-message;


$ftp-cwd(/home/clients/pvcs/adk/Installables/$ejsVersion/ejs/solaris/) or
die Cannot change working directory , $ftp-message;

$ftp-binary() or die Cannot Convert to Binary Mode ,
$ftp-message; 

$ftp-get(setup,$ejsTargetRoot/$ejsVersion/ejs/solaris/setup) or
die get failed for setup, $ftp-message;  

$ftp-cdup() or die Can't moveup to parent directory : ,
$ftp-message;


$ftp-get(archive.dat,$ejsTargetRoot/$ejsVersion/ejs/archive.dat) or die
get failed for archive, $ftp-message;

$ftp-quit;
}

Could some suggest how can i transfer a file from one remote host to another
remote host using FTP module. Is there any way of doing this . Please guide
me

Regards
Anand


RE: Antwort: FTPing of files between remote servers.

2004-07-20 Thread Anand . V
Hi Manfred Beilfuss,

Thanks for the reply. Could you elaborate on running your perl-script or any
other ftp-script remote script . 

Thanks  Best Regards,

Anand



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 20, 2004 7:08 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Antwort: FTPing of files between remote servers.



Hi Anand,

I fear that you will have to run our perl-script or any other ftp-script
remote on one of your servers, if you are bound to the ftp-protocol.
The only alternative is to copy it first to your desktop and then to the
second server.
Sorry but ftp is a protocol between two points.

Mit freundlichen Gruessen / Best regards

Manfred Beilfuss




 

[EMAIL PROTECTED]

om   An: [EMAIL PROTECTED]

 Kopie:

20.07.2004   Thema:  FTPing of files between
remote servers. 
15:09

 

 





Hi All,

I am using following code to transfer a file from remote host to local
system.

sub transferEJSFiles{

   $ftp = Net::FTP-new($sourceServer, Timeout = 30) or die Can't
contact $sourceServer: $!;

   $ftp-login($sourceUser,$sourcePassword) or die Can't login
($sourceUser):, $ftp-message;


$ftp-cwd(/home/clients/pvcs/adk/Installables/$ejsVersion/ejs/solaris/)
or
die Cannot change working directory , $ftp-message;

   $ftp-binary() or die Cannot Convert to Binary Mode ,
$ftp-message;

   $ftp-get
(setup,$ejsTargetRoot/$ejsVersion/ejs/solaris/setup) or
die get failed for setup, $ftp-message;

   $ftp-cdup() or die Can't moveup to parent directory : ,
$ftp-message;


$ftp-get(archive.dat,$ejsTargetRoot/$ejsVersion/ejs/archive.dat) or
die
get failed for archive, $ftp-message;

   $ftp-quit;
}

Could some suggest how can i transfer a file from one remote host to
another
remote host using FTP module. Is there any way of doing this . Please guide
me

Regards
Anand