Re: cutting a string

2003-09-05 Thread John
Then we have to install it. However, in activestate's distribution there is the specific modul preinstalled. - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: "Perl Beginners" <[EMAIL PROTECTED]> Sent: Friday, September 05, 20

Re: cutting a string

2003-09-05 Thread denis
Sorry, lack of sleep.. but isn't File::Basename usally installed in the standard Perl install? Denis On Fri, 5 Sep 2003 [EMAIL PROTECTED] wrote: > On Thu, 4 Sep 2003 [EMAIL PROTECTED] wrote: > > > basename is more convenient i think. What do you say? > > > Only if you can load the module on t

Re: cutting a string

2003-09-05 Thread denis
On Thu, 4 Sep 2003 [EMAIL PROTECTED] wrote: > basename is more convenient i think. What do you say? > Only if you can load the module on the system. running into issues here at work where I can load modules (security llama's) Denis > > Quoting [EMAIL PROTECTED]: > > > On Mon, 1 Sep 2003 [EMA

Re: cutting a string

2003-09-04 Thread Freddy Söderlund
you "file.txt" as output. Hope you will find it usefull. /Freddy - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: "Perl Beginners" <[EMAIL PROTECTED]> Sent: Thursday, September 04, 2003 5:20 AM Subject: Re: cutting a string

Re: cutting a string

2003-09-04 Thread sc00170
basename is more convenient i think. What do you say? Quoting [EMAIL PROTECTED]: > On Mon, 1 Sep 2003 [EMAIL PROTECTED] wrote: > > > What is the function of cutting a string from a point until the last > character? > > > > For example > > $string="C:/progra~1/directory1/directory2/file.txt"; >

Re: cutting a string

2003-09-03 Thread David Wall
--On Wednesday, September 03, 2003 9:20 PM -0600 [EMAIL PROTECTED] wrote: On Mon, 1 Sep 2003 [EMAIL PROTECTED] wrote: What is the function of cutting a string from a point until the last character? For example $string="C:/progra~1/directory1/directory2/file.txt"; i want to find the last backslash

RE: cutting a string

2003-09-03 Thread Charles K. Clarkson
denis <[EMAIL PROTECTED]> offered this solution: : why not try this? : : #!/usr/bin/perl : my @test=''; : my $string = "C:/test/me"; : @test = split('/',$string); : print "@test\n"; : print "$test[$#test]\n"; The last item of an array can be retrieved using an index of -1. print "$test[$#

Re: cutting a string

2003-09-03 Thread denis
On Wed, 3 Sep 2003 [EMAIL PROTECTED] wrote: > On Mon, 1 Sep 2003 [EMAIL PROTECTED] wrote: > > > What is the function of cutting a string from a point until the last character? > > > > For example > > $string="C:/progra~1/directory1/directory2/file.txt"; > > > > i want to find the last backslash

Re: cutting a string

2003-09-03 Thread denis
On Mon, 1 Sep 2003 [EMAIL PROTECTED] wrote: > What is the function of cutting a string from a point until the last character? > > For example > $string="C:/progra~1/directory1/directory2/file.txt"; > > i want to find the last backslash (/) of the string and keep the sequence > following it (fil

RE: cutting a string

2003-09-01 Thread Danny Miller
As long as the format of what you want (file.txt) remains the same you could do the following: ($stuffattheend) = $string =~ /\/(\w+\.\w+)$/; Danny -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, September 01, 2003 11:41 AM To: Perl Beginners Subject:

Re: cutting a string

2003-09-01 Thread Rob Anderson
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > What is the function of cutting a string from a point until the last character? > > For example > $string="C:/progra~1/directory1/directory2/file.txt"; > > i want to find the last backslash (/) of the string and keep the sequence > foll