system sudo and backslashing #

2007-11-17 Thread R (Chandra) Chandrasekhar
Folks, This is a Linux-oriented question. I am writing a script that may be executed by a user with admin privileges, if required, on a root-userless K/Ubuntu system. I want to make sub-directories under a parent using sudo with the same UID as the parent directory. I am also trying to copy

Re: 400 bad request while retrieving a frame page with WWW::Mechanize

2007-11-17 Thread lcerneka
On Nov 16, 4:39 pm, [EMAIL PROTECTED] (Tom Phoenix) wrote: On 11/16/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I get an html page with a 400 error code (Bad Request) When asking for this page directly from a browser (Firefox or IE) it works fine... This happens often enough that it

Re: 400 bad request while retrieving a frame page with WWW::Mechanize

2007-11-17 Thread Peter Scott
On Sat, 17 Nov 2007 03:28:14 -0800, lcerneka wrote: On Nov 16, 4:39 pm, [EMAIL PROTECTED] (Tom Phoenix) wrote: On 11/16/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I get an html page with a 400 error code (Bad Request) When asking for this page directly from a browser (Firefox or IE) it

Re: Checking the two variable

2007-11-17 Thread Rob Dixon
sivasakthi wrote: Hi all, I have the two variables, like below, $val1=[15/Apr/2005:11:46:35 +0300]; $val2=[12/Nov/2007:14:59:00 +0530]; I want to check these two variables are equal or not.. I know the method of splitting the each column and compare it.. but it too large.. is it possible to

Re: system sudo and backslashing #

2007-11-17 Thread Rob Dixon
R (Chandra) Chandrasekhar wrote: This is a Linux-oriented question. [snip] I'm sorry, we answer only Perl-orientated questions on this list :) Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: system sudo and backslashing #

2007-11-17 Thread Tom Phoenix
On 11/16/07, R (Chandra) Chandrasekhar [EMAIL PROTECTED] wrote: This is a Linux-oriented question. Then why would you ask it in a Perl-oriented forum? It would seem, from your opening, that you should be asking in a Linux-oriented forum. (But you do have a Perl question, after all.) system

Building a string to contain a \

2007-11-17 Thread AndrewMcHorney
Hello I am trying to build a string that contains the following text dir c:\ /S so I can get a complete directory of all the files on drive C and put them into an array with the following line of code - @dir_list = 'dir c:\ /S`; Right now I have the following working: However, it is now

Parsing a string into an array

2007-11-17 Thread AndrewMcHorney
Hello I am getting a strange error where I am trying to split a string into an array. The string is a line obtained from doing a directory of a disk. The error message is: Reference to nonexistent group in regex; marked by -- HERE in m/ Directory of C :\Documents and

Re: 400 bad request while retrieving a frame page with WWW::Mechanize

2007-11-17 Thread lcerneka
On Nov 17, 2:30 pm, [EMAIL PROTECTED] (Peter Scott) wrote: On Sat, 17 Nov 2007 03:28:14 -0800, lcerneka wrote: On Nov 16, 4:39 pm, [EMAIL PROTECTED] (Tom Phoenix) wrote: On 11/16/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I get an html page with a 400 error code (Bad Request) When

Re: Parsing a string into an array

2007-11-17 Thread John W . Krahn
On Friday 16 November 2007 13:28, AndrewMcHorney wrote: Hello Hello, I am getting a strange error Why do you think it is strange? Have you read the documentation for the split function and do you understand it? perldoc -f split where I am trying to split a string into an array. The

Re: Building a string to contain a \

2007-11-17 Thread Gunnar Hjalmarsson
AndrewMcHorney wrote: I am trying to build a string that contains the following text dir c:\ /S Use single quotes: my $command = 'dir c:\ /s'; so I can get a complete directory of all the files on drive C and put them into an array with the following line of code - @dir_list = 'dir c:\

Split string into array

2007-11-17 Thread AndrewMcHorney
Hello I now got my directory listing into an array of strings. I would like to now split up the string into a an array of strings from the original string. For example, I might have a string of a b c d and I now want a 4 element array containing a, b, c, 'd. I did the following but it did

Re: Split string into array

2007-11-17 Thread Tom Phoenix
On 11/16/07, AndrewMcHorney [EMAIL PROTECTED] wrote: I now got my directory listing into an array of strings. I would like to now split up the string into a an array of strings from the original string. For example, I might have a string of a b c d and I now want a 4 element array containing

Re: Building a string to contain a \

2007-11-17 Thread Mathew
You have to escape it with another backslash. 'C:\\ /S' Keep up with my goings on at http://theillien.blogspot.com AndrewMcHorney wrote: Hello I am trying to build a string that contains the following text dir c:\ /S so I can get a complete directory of all the files on drive C and put

Re: Split string into array

2007-11-17 Thread AndrewMcHorney
Tom I thought taking a string and assigning it to an array would do it and I was wrong. Here is a sample line of source; 2004-08-03 23:57 1,712,128 GdiPlus.dll and the recommended split gives me 13 for the number of items. I would like an array that has 2004-08-03,

Re: Split string into array

2007-11-17 Thread John W . Krahn
On Friday 16 November 2007 17:24, AndrewMcHorney wrote: Hello Hello, I now got my directory listing into an array of strings. I would like to now split up the string into a an array of strings from the original string. For example, I might have a string of a b c d and I now want a 4

Re: Split string into array

2007-11-17 Thread Tom Phoenix
On 11/16/07, AndrewMcHorney [EMAIL PROTECTED] wrote: Here is a sample line of source; 2004-08-03 23:57 1,712,128 GdiPlus.dll and the recommended split gives me 13 for the number of items. I would like an array that has 2004-08-03, 23:57,1,712,128,GdiPlus.dll as the elements of