Usage of ftp or sftp in perl as a shell commands

2007-02-12 Thread Bhavirisetty, Gangadhara (TCS)
Hi, I'm working on HP-UX 11 and somehow ftp is not working but 'sftp' is working, so I'm trying to use SFTP commands as shell commands within Perl script to transfer a file. Can someone please suggest how can I accomplish and provide sample code, if possible? Thanks in advance!! Thank you,

Re: Usage of ftp or sftp in perl as a shell commands

2007-02-12 Thread Tyler Gee
On 2/12/07, Bhavirisetty, Gangadhara (TCS) [EMAIL PROTECTED] wrote: Hi, I'm working on HP-UX 11 and somehow ftp is not working but 'sftp' is working, so I'm trying to use SFTP commands as shell commands within Perl script to transfer a file. Can someone please suggest how can I accomplish and

Re: How do I understand this HTTP::Request-new(GET = $url);

2007-02-12 Thread John W. Krahn
Spark Shen wrote: 2007/2/12, John W. Krahn [EMAIL PROTECTED]: Spark Shen wrote: I am a fresh bird on perl. :-) Could gurus help me to understand this statement. *HTTP::Request-new(GET = $url);* How does perl parse the struct *GET = $url* here. (GET = $url) is a list of two

Filesys::DiskUsage vs shell du

2007-02-12 Thread Ed
Hi all, I am having problems with the difference in output between du from bash and du from Filesys::DiskUsage. I wrote this little file to demonstrate my problem. I am very new to perl so please forgive me if it's a silly mistake :) file: #!/usr/bin/perl -w use Filesys::DiskUsage qw/du/;

Re: DOS to Windows format tr/\n\r\t/ /

2007-02-12 Thread vjp2
I am not sure I understand the problem, but do you know the Text::Wrap standard module in any case? I used it on Unix, but I'm not sure it runs on my DOS version. So I found a one liner on the net. It works ALMOST right. -- - = - Vasos Panagiotopoulos,

Re: DOS to Windows format tr/\n\r\t/ /

2007-02-12 Thread D. Bolliger
[EMAIL PROTECTED] am Montag, 12. Februar 2007 14:11: I am not sure I understand the problem, but do you know the Text::Wrap standard module in any case? I used it on Unix, but I'm not sure it runs on my DOS version. Sounds as if it might be worth trying. It won't hurt your box if it doesn't.

concatenation

2007-02-12 Thread Sayed, Irfan \(Irfan\)
Hi All, I need to concatenate specific string for each element in the array. I tried in the following way with the help of join operator. foreach (@mail) { my $str1=$_; $str1=$str1 . @abc.com; print $str1\n; } But somehow it is not getting concateneted. please help. Regards Irfan.

Re: concatenation

2007-02-12 Thread Jeff Pang
foreach (@mail) { my $str1=$_; $str1=$str1 . @abc.com; print $str1\n; } But somehow it is not getting concateneted. Hi, replace: $str1=$str1 . @abc.com; to: $str1 .= '@abc.com'; I think that would work. In your case,@abc.com has been parsed by Perl as an array. -- Jeff Pang

Re: concatenation

2007-02-12 Thread Adriano Ferreira
On 2/12/07, Sayed, Irfan (Irfan) [EMAIL PROTECTED] wrote: Hi All, I need to concatenate specific string for each element in the array. I tried in the following way with the help of join operator. foreach (@mail) { my $str1=$_; $str1=$str1 . @abc.com; @abc.com is an interpolating string,

Re: concatenation

2007-02-12 Thread Stephen Gallagher
one option: @mail= (here,there,everywhere); foreach $Mine (@mail) { $str1=$Mine . '@cbc.com'; print $str1\n; } [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] - sg Sayed, Irfan (Irfan) wrote: Hi All, I need to concatenate specific string for each element in the array. I tried in

Re: Please help with convoluted script

2007-02-12 Thread Ken Foskey
On Sun, 2007-02-04 at 07:27 -0800, Tom Phoenix wrote: On 2/3/07, Mathew Snyder [EMAIL PROTECTED] wrote: my @date = (localtime)[3..5]; my $day = sprintf '%02d', $date[0] - 1; my $month= sprintf '%02d', $date[1] + 1; You shouldn't have to do arithmetic on the date

pattern match

2007-02-12 Thread Vladimir Lemberg
Hi, I have a script, which suppose to find all *.xml files under the specified directory then process them. I'm facing the pattern match problem: use strict; use warnings; use Win32; use File::Find; @ARGV = Win32::GetCwd() unless @ARGV; my @dirs; find (\FindXml, $ARGV[0]); sub FindXml {

RE: pattern match

2007-02-12 Thread Wagner, David --- Senior Programmer Analyst --- WGO
-Original Message- From: Vladimir Lemberg [mailto:[EMAIL PROTECTED] Sent: Monday, February 12, 2007 12:33 To: beginners@perl.org Subject: pattern match Hi, I have a script, which suppose to find all *.xml files under the specified directory then process them. I'm facing the

Re: pattern match

2007-02-12 Thread Vladimir Lemberg
David, Thanks you very much! It works -) - Original Message - From: Wagner, David --- Senior Programmer Analyst --- WGO [EMAIL PROTECTED] To: Vladimir Lemberg [EMAIL PROTECTED]; beginners@perl.org Sent: Monday, February 12, 2007 12:46 PM Subject: RE: pattern match -Original

Re: pattern match

2007-02-12 Thread D. Bolliger
Vladimir Lemberg am Montag, 12. Februar 2007 21:33: Hi, Hi Vladimir (in addition to Davids post) I have a script, which suppose to find all *.xml files under the specified directory then process them. I'm facing the pattern match problem: use strict; use warnings; use Win32; use

Re: Dynamically calling a subroutine

2007-02-12 Thread Chad Perrin
On Mon, Feb 12, 2007 at 10:26:26PM +0100, Ana Saiz García wrote: Hello First of all, I apologize if this is not the right list to ask my question, but as I am a perl beginner, I think it is the most suitable list for me :o) So here goes my question: I have a main program which will call

Re: pattern match

2007-02-12 Thread Mumia W.
On 02/12/2007 02:33 PM, Vladimir Lemberg wrote: Hi, I have a script, which suppose to find all *.xml files under the specified directory then process them. I'm facing the pattern match problem: use strict; use warnings; use Win32; use File::Find; @ARGV = Win32::GetCwd() unless @ARGV; my

Re: Dynamically calling a subroutine

2007-02-12 Thread D. Bolliger
Ana Saiz García am Montag, 12. Februar 2007 22:26: Hello Hello Ana First of all, I apologize if this is not the right list to ask my question, but as I am a perl beginner, I think it is the most suitable list for me :o) So here goes my question: I have a main program which will call a

Re: Dynamically calling a subroutine

2007-02-12 Thread Mumia W.
On 02/12/2007 03:26 PM, Ana Saiz García wrote: Hello First of all, I apologize if this is not the right list to ask my question, but as I am a perl beginner, I think it is the most suitable list for me :o) So here goes my question: I have a main program which will call a subroutine, say S,

Re: Dynamically calling a subroutine

2007-02-12 Thread Igor Sutton Lopes
Hi Ana, On 2007/02/12, at 21:26, Ana Saiz García wrote: Hello First of all, I apologize if this is not the right list to ask my question, but as I am a perl beginner, I think it is the most suitable list for me :o) So here goes my question: I have a main program which will call a

Re: pattern match

2007-02-12 Thread D. Bolliger
Mumia W. am Montag, 12. Februar 2007 21:53: On 02/12/2007 02:33 PM, Vladimir Lemberg wrote: Hi, I have a script, which suppose to find all *.xml files under the specified directory then process them. I'm facing the pattern match problem: use strict; use warnings; use Win32;

[Correction] Re: pattern match

2007-02-12 Thread D. Bolliger
D. Bolliger am Montag, 12. Februar 2007 23:03: Mumia W. am Montag, 12. Februar 2007 21:53: On 02/12/2007 02:33 PM, Vladimir Lemberg wrote: [snipped] Mumia, please excuse me for my inappropriate correction! You probably want to push the filename onto the array if you get a successful

HTTP Post using IO::Socket

2007-02-12 Thread Sumit Shah
All, I would appreciate if someone could tell me how to do an HTTP Post using IO::Socket. I cannot use LWP. I have to manage it with plain Sockets. I am new to this and any help would be appreciated. Thanks Sumit -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

Re: Filesys::DiskUsage vs shell du

2007-02-12 Thread John W. Krahn
Ed wrote: Hi all, Hello, I am having problems with the difference in output between du from bash and du from Filesys::DiskUsage. I wrote this little file to demonstrate my problem. I am very new to perl so please forgive me if it's a silly mistake :) file: #!/usr/bin/perl -w

Re: HTTP Post using IO::Socket

2007-02-12 Thread Randal L. Schwartz
Sumit == Sumit Shah [EMAIL PROTECTED] writes: Sumit I would appreciate if someone could tell me how to do an HTTP Post Sumit using IO::Socket. I cannot use LWP. I have to manage it with plain Sumit Sockets. You can *always* use LWP in any sane Perl setup, especially considering that there are

Re: HTTP Post using IO::Socket

2007-02-12 Thread Jeff Pang
I would appreciate if someone could tell me how to do an HTTP Post using IO::Socket. I cannot use LWP. I have to manage it with plain Sockets. Post with LWP::UserAgent and HTTP::Request is very convenient since both the modules are current Perl's builtin modules.Please take a look at perldoc

Re: Dynamically calling a subroutine

2007-02-12 Thread Jeff Pang
One way to diff the same subroutine name in different modules is using full package name. For example,both package APACK and package BPACK have the same subroutine mytest(),then you can call them independently by: APACK::mytest(); BPACK::mytest(); It wouldn't make the conflict. Maybe I'm

about die's output

2007-02-12 Thread Jm lists
hello,lists, When I said: die usage: $0 pub|del; I got this output: usage: xxx.pl pub|del at xxx.pl line 20. Then when I said: die usage: $0 pub|del\n; Only the \n was added.The output became: usage: xxx.pl pub|del It lost the words of at xxx.pl line 20.. Why is this?Thank you.

Re: about die's output

2007-02-12 Thread John W. Krahn
Jm lists wrote: hello,lists, Hello, When I said: die usage: $0 pub|del; I got this output: usage: xxx.pl pub|del at xxx.pl line 20. Then when I said: die usage: $0 pub|del\n; Only the \n was added.The output became: usage: xxx.pl pub|del It lost the words of at

Re: [Correction] Re: pattern match

2007-02-12 Thread Mumia W.
On 02/12/2007 04:17 PM, D. Bolliger wrote: D. Bolliger am Montag, 12. Februar 2007 23:03: Mumia W. am Montag, 12. Februar 2007 21:53: On 02/12/2007 02:33 PM, Vladimir Lemberg wrote: [snipped] Mumia, please excuse me for my inappropriate correction! [...] No problem. I'm glad I tested it