absolute path of current process

2005-05-26 Thread Peter Rabbitson
Is this: my $path = [File::Spec->splitpath (File::Spec->rel2abs ($0))]->[1]; the only OS independent (unix/win32) way to determine the absolute path of the directory which contains the current process, or there is a less cryptic way that I am overlooking? P.S. I know the above will not work if

Re: absolute path of current process

2005-05-26 Thread Peter Rabbitson
On Thu, May 26, 2005 at 05:38:50AM -0500, Peter Rabbitson wrote: > Is this: > > my $path = [File::Spec->splitpath (File::Spec->rel2abs ($0))]->[1]; > > the only OS independent (unix/win32) way to determine the absolute path of > the directory which contains the current process, or there is a les

Re: absolute path of current process

2005-05-26 Thread Paul Johnson
On Thu, May 26, 2005 at 05:48:41AM -0500, Peter Rabbitson wrote: > On Thu, May 26, 2005 at 05:38:50AM -0500, Peter Rabbitson wrote: > > Is this: > > > > my $path = [File::Spec->splitpath (File::Spec->rel2abs ($0))]->[1]; > > > > the only OS independent (unix/win32) way to determine the absolute

Re: absolute path of current process

2005-05-26 Thread Offer Kaye
On 5/26/05, Peter Rabbitson <[EMAIL PROTECTED]> wrote: > Is this: > > my $path = [File::Spec->splitpath (File::Spec->rel2abs ($0))]->[1]; > > the only OS independent (unix/win32) way to determine the absolute path of > the directory which contains the current process, or there is a less cryptic >

search a file

2005-05-26 Thread Eliyah
Hello, I'm writing a simple perl program. no CGI. * I need to make the program list all the files that have an extension of ".v" in the current directory. Do anyone know a function that makes that ?! Best Regards, Eliyah -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mai

RE: search a file

2005-05-26 Thread Moon, John
Subject: search a file Hello, I'm writing a simple perl program. no CGI. * I need to make the program list all the files that have an extension of ".v" in the current directory. Do anyone know a function that makes that ?! Best Regards, Eliyah One way ... @a=glob('*.v'); print join("\n",@a), "\

RE: search a file

2005-05-26 Thread Manav Mathur
See perldoc -f glob and the angle bracket operator in perldoc perlop @files = glob("*.v") ; #or @files = <*.v> ; |-Original Message- |From: Eliyah [mailto:[EMAIL PROTECTED] |Sent: Thursday, May 26, 2005 3:10 PM |To: beginners@perl.org |Subject: search a file | | |Hello, I'm writing a s

Re: why getstore can't work, especially for store xml file on freebsd

2005-05-26 Thread Jay Savage
On 5/24/05, Franklin <[EMAIL PROTECTED]> wrote: > Hi; > > I have a small program that uses getstore to fetch a xml webpahe and > store it. It is: > > use strict; > use warnings; > > use LWP::Simple; > > my > $xmlurl="http://www.sec.gov/Archives/edgar/data/903404/000118143105029692/rrd79736.xml

Re: assigning printf statement to an array

2005-05-26 Thread DBSMITH
DITTO! THANKS Men! Derek B. Smith OhioHealth IT UNIX / TSM / EDM Teams John Doe To

search and replace confusion

2005-05-26 Thread Jason Balicki
What I'm trying to do with the following code is convert some iCal files so that a specific application will read them. The problem is that this application can't deal with entries that have a date but no time. (Full examples below.) For example, if I have a DTSTART:20050616 in the file, I wan

RE: search and replace confusion

2005-05-26 Thread Moon, John
Subject: search and replace confusion What I'm trying to do with the following code is convert some iCal files so that a specific application will read them. The problem is that this application can't deal with entries that have a date but no time. (Full examples below.) For example, if I have

RE: search and replace confusion

2005-05-26 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Jason Balicki wrote: > What I'm trying to do with the following code is convert > some iCal files so that a specific application will read > them. > > The problem is that this application can't deal with > entries that have a date but no time. > > (Full examples below.) For example, if I have a

RE: search and replace confusion

2005-05-26 Thread Jason Balicki
Wagner, David --- Senior Programmer Analyst --- WGO wrote: > The above seems to be what you stated you wanted. I did nothing > else in processing. I am running on AS Perl 5.8.3 build 809 Thanks, any guesses as to what's wrong with my outer loop? --J(K) -- To

RE: search and replace confusion

2005-05-26 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Jason Balicki wrote: > Wagner, David --- Senior Programmer Analyst --- WGO > wrote: >> The above seems to be what you stated you wanted. I did nothing >> else in processing. I am running on AS Perl 5.8.3 build 809 > > Thanks, any guesses as to what's wrong with my

RE: search and replace confusion

2005-05-26 Thread Charles K. Clarkson
Jason Balicki wrote: : in the file, I want to convert it to: : : DTSTART:20050616T07Z : : But with my code below this line prints as: : : T07Z20050616 : : overwriting instead of appending the time value. Not when I tried it. It was appended. I did

bold print to a FH

2005-05-26 Thread DBSMITH
All, I want to have bold print of a Title but it is not working. Here is my code: require 5.6.1; use strict; use warnings; use diagnostics; use MIME::Lite; use Term::ANSIColor; use Logfile::Rotate; $^T=time; our $now = time(); our $tapes = qq(/var/tmp/volrpt.log); our $mt= (stat("$tapes")

Re: How to upgrade local module using -MCPAN?

2005-05-26 Thread Binish A R
Yu Wang wrote: Hi, All I am curious about how to upgrade local module in 'perl -MCPAN -e shell'? Thanks! Yu Hi, From the CPAN shell, try install MODULENAME force install MODULENAME like install DBI install DBD -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional command

RE: search and replace confusion

2005-05-26 Thread Jason Balicki
Wagner, David --- Senior Programmer Analyst --- WGO > are the files you are processing from the same environment or a > different one? If different, then it might be invalid translation of Well, I'm processing from a Linux box, and the files are created on the same box, however your comment tipped

Re: bold print to a FH

2005-05-26 Thread Jay Savage
On 5/26/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > All, > > I want to have bold print of a Title but it is not working. Here is my > code: > > require 5.6.1; > > use strict; > use warnings; > use diagnostics; > use MIME::Lite; > use Term::ANSIColor; > use Logfile::Rotate; > $^T=time; >

Re: bold print to a FH

2005-05-26 Thread DBSMITH
the code print MU color 'bold', "BLAH BLAH BLAH \n"; is not working with error: Uncaught exception from user code: Invalid attribute name media at disk_cache-tape_slot-usage.pl line 45 Carp::croak('Invalid attribute name media') called at /usr/perl5/5.6.1/lib/Term/ANSIColor.pm

Re: bold print to a FH

2005-05-26 Thread Jay Savage
On 5/26/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > the code > > print MU color 'bold', "BLAH BLAH BLAH \n"; > > is not working with error: > > > Uncaught exception from user code: > Invalid attribute name media at disk_cache-tape_slot-usage.pl line > 45 > Carp::croak('I

Re: bold print to a FH

2005-05-26 Thread DBSMITH
yes of course I read it otherwise I would of not of sent an email! This is a help list correct? thanks Derek B. Smith OhioHealth IT UNIX / TSM / EDM Teams Jay Savage

is there a simple way get the current line number of processed file?

2005-05-26 Thread bingfeng zhao
To parse a regular text file, I should report the line number of parsed file when error occured. I want to know whether perl provide a shortcut way or magic '$?' indicate this. I must counting myself if not.   Thanks in advance     smime.p7s Description: S/MIME cryptographic signature

Passing argu to a C function.

2005-05-26 Thread J aperlh
Passing argu to a C function. There is a C functin: short GeErrMsg(BSTR* ErrMsg); What should I pass to this function when calling it? I tried all the following ways, but failed. my @arr; $obj->GetErrMsg($arr[0]); $obj->GetErrMsg([EMAIL PROTECTED]); $obj->GetErrMsg([EMAIL PROTECTED]); $obj->Get

Passing argu to a C function.

2005-05-26 Thread J aperlh
Passing argu to a C function. There is a C functin: short GeErrMsg(BSTR* ErrMsg); What should I pass to this function when calling it? I tried all the following ways, but failed. my @arr; $obj->GetErrMsg($arr[0]); $obj->GetErrMsg([EMAIL PROTECTED]); $obj->GetErrMsg([EMAIL PROTECTED]); $obj->Get

Re: bold print to a FH

2005-05-26 Thread Jeff 'japhy' Pinyan
On May 26, [EMAIL PROTECTED] said: the code print MU color 'bold', "BLAH BLAH BLAH \n"; is not working with error: Uncaught exception from user code: Invalid attribute name media at disk_cache-tape_slot-usage.pl line 45 Carp::croak('Invalid attribute name media') called at /usr/

Re: is there a simple way get the current line number of processed file?

2005-05-26 Thread Jeff 'japhy' Pinyan
On May 27, bingfeng zhao said: To parse a regular text file, I should report the line number of parsed file when error occured. I want to know whether perl provide a shortcut way or magic '$?' indicate this. I must counting myself if not. When reading from a filehandle, the $. variable holds t

RE: is there a simple way get the current line number of processe d file?

2005-05-26 Thread Thomas Bätzler
smime.p7m Description: S/MIME encrypted message

RE: bold print to a FH

2005-05-26 Thread Thomas Bätzler
<[EMAIL PROTECTED]> asked: > the code > > print MU color 'bold', "BLAH BLAH BLAH \n"; > > is not working with error: > > > Uncaught exception from user code: > Invalid attribute name media at > disk_cache-tape_slot-usage.pl line > 45 > Carp::croak('Invalid attribute name media