Re: Perl stat script ... ???

2010-07-19 Thread Shlomi Fish
Hi, On Monday 19 Jul 2010 08:50:35 newbie01 perl wrote: > Hi all, > > Does anyone know if someone had written a Perl stat script that mimics the > Linux' stat command? > > I want to be able to use the stat command on Solaris, unfortunately, I just > found out that that command is not available o

usage of Split on pattern matching

2010-07-19 Thread Chandan Kumar
Hi all,   Iam beginner to perl & i have a small query on split. using split i want print everything even the character used to split on string.   Here is my example :   my $string = "hi123now456itstimeforsplit789right" my @array  = split ( '/(\d+\s)/ ',$string); ## Trying to split using digitnumbe

Re: usage of Split on pattern matching

2010-07-19 Thread Chas. Owens
On Mon, Jul 19, 2010 at 08:14, Chandan Kumar wrote: snip > my $string = "hi123now456itstimeforsplit789right" > my @array  = split ( '/(\d+\s)/ ',$string); snip > When I run the program ,it prints the whole string. so my assumption is wrong. > > please Could some one explain me on this? snip The s

Re: usage of Split on pattern matching

2010-07-19 Thread John W. Krahn
Chandan Kumar wrote: Hi all, Hello, Iam beginner to perl& i have a small query on split. using split i want print everything even the character used to split on string. Here is my example : my $string = "hi123now456itstimeforsplit789right" my @array = split ( '/(\d+\s)/ ',$string); ## Try

Re: usage of Split on pattern matching

2010-07-19 Thread Chandan Kumar
Thanks guys, I could able to understand split fun. --- On Mon, 19/7/10, John W. Krahn wrote: From: John W. Krahn Subject: Re: usage of Split on pattern matching To: "Perl Beginners" Date: Monday, 19 July, 2010, 4:29 PM Chandan Kumar wrote: > Hi all, Hello, > Iam beginner to perl&  i have

Can't use string 1 as HASH ref while strict refs in use

2010-07-19 Thread Mimi Cafe
I passed a has reference to my sub and tried dereferencing it within the sub and get an exception Can't use string ("1") as HASH ref while strict refs in use. my %mail_parameters = ( 'Fname' => "$nickname_db_exist[1]", 'Lname' => "$nickname_db_exist[2]", 'E-mail' => "$res

Re: Can't use string 1 as HASH ref while strict refs in use

2010-07-19 Thread Uri Guttman
> "MC" == Mimi Cafe writes: MC> $received_arg = @_; read perldoc perldata and see what happens when you assign an array to a scalar. you don't get what you think you are getting. context is VERY important to learn in perl and this is a critical context situation that is very common. i