Re: doubt in substring

2011-01-14 Thread Emeka
Setting environment for using XAMPP for Windows. rmicro@RMICRO-PC C:\Program Files\xampp # perl -le '$str = "the cat sat on the mat";print substr( $str, 4, -4 )' Can't find string terminator "'" anywhere before EOF at -e line 1. rmicro@RMICRO-PC C:\Program Files\xampp # It failed to work for me

Re: doubt in substring

2011-01-15 Thread Emeka
*If I were beginning with Perl, I certainly would not practise in the console but get an editor, such as SciTE* Yes, I am. On Sat, Jan 15, 2011 at 3:04 PM, John Delacour wrote: > On 15 January 2011 07:52, Emeka wrote: > > > # perl -le '$str = "the cat sat on the mat"

Twisting Text

2011-03-23 Thread Emeka
t to use brute force , I have an algorithm to speed things up. Can somebody help me? Regards, Emeka -- *Satajanus Nig. Ltd *

Re: Twisting Text

2011-03-24 Thread Emeka
but he base word is trace. I am checking on this game http://games.yahoo.com/game/text-twist-2, that is why I am looking at the algorithm to use to get this achieved. Regards, Emeka On Thu, Mar 24, 2011 at 1:41 AM, John W. Krahn r wrote: > Emeka wrote: > >> Hello All, >> >

Hanging out here

2011-07-23 Thread Emeka
alled Learning Perl the Soft Way. Finally , this group is awesome ... with kind experts and mentors. I really appreciate you help and time. Regards, Emeka -- *Satajanus Nig. Ltd *

Re: Hanging out here

2011-07-24 Thread Emeka
Goke, I based in Port-Harcourt. But I would very much like to be part of your meetup. Could you give me details and your schedule? Emeka On Sun, Jul 24, 2011 at 6:08 PM, Goke Aruna wrote: > Nice to see enema in this list. > Mekus ..are you based in lagos? Nice to share some thoughts

Re: Add line feed to line

2011-07-28 Thread Emeka
Timo, #!/usr/bib/perl -w What is "-w" doing here? Emeka On Wed, Jul 27, 2011 at 9:59 PM, timothy adigun <2teezp...@gmail.com> wrote: > Tim, > >>>>>>check this if it answers ur #1 question: > #!/usr/bib/perl -w > > $\="\n"

End-of-Marker

2011-07-28 Thread Emeka
Hello All, Could someone explain what $\ (end-of-marker) is? I need something detail with simple and complex examples? Emeka -- *Satajanus Nig. Ltd *

Re: End-of-Marker

2011-07-29 Thread Emeka
Google to pick thing out easily. But when Google is not there to back me up I would only depend on your mercy and stackoverflow. Emeka On Thu, Jul 28, 2011 at 11:04 PM, Rob Dixon wrote: > On 28/07/2011 22:58, Emeka wrote: > >> Rob, >> >> Thanks...

Re: perl reference

2011-07-30 Thread Emeka
Timo, One can even pass hash to a subroutine with a little trick, 'cos the default argument of a subroutine is an array "@_". ** Check Example 2, in the code below. I think this trick is formalized by context rule. @voo = ("boon", 12, "man", 88); %coo = @voo; my $line = ""; while(my ($key, $val)

Re: perl reference

2011-07-30 Thread Emeka
quot;$key => $val\n"; } print $line; Emeka On Sat, Jul 30, 2011 at 3:09 PM, timothy adigun <2teezp...@gmail.com> wrote: > Emeka, > Yes in a way, but the point am making here is that > one can also pass hash into a subroutine. Context is everything in Perl! > Caution

Access files in a folder

2011-07-31 Thread Emeka
Hello All, I wanted to do this ... while(<*.pl>){ print $_; } I got "BEGIN failed--compilation" Am I using something that is old? Emeka -- *Satajanus Nig. Ltd *

Re: Access files in a folder

2011-07-31 Thread Emeka
Thanks Rob ... It worked. Shawn thanks so much. I found out that the problem was from my little box Nanonote... It has a light weight Perl. When I switched to real thing it worked. Emeka On Sun, Jul 31, 2011 at 11:02 PM, Rob Dixon wrote: > On 31/07/2011 21:52, Emeka wrote: > >&g

Re: Access files in a folder

2011-07-31 Thread Emeka
Shawn, Yours will print the content of each file... while mine will list only their names. Emeka On Sun, Jul 31, 2011 at 9:57 PM, Shawn H Corey wrote: > On 11-07-31 04:52 PM, Emeka wrote: > >> Hello All, >> >> >> I wanted to do this ... >> >> while

Re: open files in a directory

2011-08-01 Thread Emeka
I guess that $sum should be "my $sum" before using it. Emeka On Mon, Aug 1, 2011 at 8:26 AM, John W. Krahn wrote: > homedw wrote: > >> hi all, >> > > Hello, > > > > i want to open some tha files in a directory, you can see the details &g

Characters

2011-08-01 Thread Emeka
Hello All, I would like to know how to access character from string lateral. Say I have $foo = "From Big Brother Africa"; I would want to print each of the characters of $foo on its own. In some languages string type is just array/list of characters. What is it in Perl? Emeka --

Re: Characters

2011-08-01 Thread Emeka
John, Thanks and thanks :) Emeka On Mon, Aug 1, 2011 at 2:45 PM, John W. Krahn wrote: > Emeka wrote: > >> Hello All, >> > > Hello, > > > I would like to know how to access character from string lateral. >> >> Say I have >> $foo = "Fr

Re: Characters

2011-08-01 Thread Emeka
Shlomi, Yea, that makes sense now. Emeka On Mon, Aug 1, 2011 at 2:52 PM, Shlomi Fish wrote: > On Mon, 1 Aug 2011 13:49:22 +0100 > AKINLEYE wrote: > > > my @characters = split /[\s]/, $foo; > > foreach my $letter(@characters ) > > { > >print $letter

Re: Characters

2011-08-01 Thread Emeka
Brian, Thanks for re-directing me back to my original question, and thank again for your well researched comment. I intend to dig deeper into string...hopefully know a bit of the internals. Emeka On Tue, Aug 2, 2011 at 3:39 AM, Brian Fraser wrote: > On Mon, Aug 1, 2011 at 9:14 AM, Em

Re: Characters

2011-08-01 Thread Emeka
Rob, I have already picked up those functions. I think they are virtually the same in all languages. Thanks Emeka On Mon, Aug 1, 2011 at 6:21 PM, Rob Dixon wrote: > On 01/08/2011 13:14, Emeka wrote: > >> >> I would like to know how to access character from string lateral

Re: perl code to export data to excel

2011-08-04 Thread Emeka
Vino, First learn how to use Excel with Perl. The below might be useful, please check them out. http://support.microsoft.com/kb/214797 http://www.ibm.com/developerworks/linux/library/l-pexcel/ Emeka On Thu, Aug 4, 2011 at 10:03 AM, VinoRex.E wrote: > Hi > i am a beginner in Perl i

Re: Parsing a Text File using regex

2011-08-06 Thread Emeka
John, Thanks for making things pretty simple for mere mortals .. >> > chomp( my $raw_file = glob "@ARGV" ); > I am of the view that glob sub is used for as tree (that is to get all the files in a folder and all its sub-folders. From the above, it seems like it could be used for something else.

I am going through github perl code

2011-08-11 Thread Emeka
Hello All, What is the purpose of colon here ? sub pop : method { my $self = shift; my ($list) = $self->_prepare(@_); pop @$list; my $result = $list; return $self->_finalize($result); } Is this how to do function alias? sub sortBy {&sort_by} # sub sort_by { my $self =

GUI Module

2011-08-23 Thread Emeka
Hello All, I am thinking of check out GUI ... so I would need to know where to start off. Is there a GUI module with Perl? Or am I going to pull one from web? Emeka -- *Satajanus Nig. Ltd *

Re: GUI Module

2011-08-23 Thread Emeka
der. > > Perl-Tk > > On Tue, Aug 23, 2011 at 4:53 PM, Emeka wrote: > >> Hello All, >> >> >> I am thinking of check out GUI ... so I would need to know where to start >> off. Is there a GUI module with Perl? Or am I going to pull one from w

Not walking together with Getopt Module

2011-08-23 Thread Emeka
Hello All, Why shouldn't this work? use Getopt::Long; #$debug = 0; $result = GetOptions("age=i" => $age); if ($age) {print "Input age is $age years"; } Emeka -- *Satajanus Nig. Ltd *

CPAN on Windows Box

2011-08-23 Thread Emeka
Hello All I tried this in order to install Perl-tk cpan>install tk... But it failed to work. Emeka -- *Satajanus Nig. Ltd *

Re: loop break condition

2011-08-24 Thread Emeka
Do we really need "goto" here? Emeka On Mon, Aug 22, 2011 at 10:03 AM, Shlomi Fish wrote: > Hi Alan, > > On Mon, 22 Aug 2011 13:10:05 +0530 > Alan Haggai Alavi wrote: > > > Hello Anant, > > > > > i want to input some numbers via in while

Re: CPAN on Windows Box

2011-08-24 Thread Emeka
On Wed, Aug 24, 2011 at 12:31 AM, Jim Gibson wrote: > On 8/23/11 Tue Aug 23, 2011 3:04 PM, "Emeka" > scribbled: > > > Hello All > > I tried this in order to install Perl-tk cpan>install tk... But it > > failed to work. > > You need to let

Re: CPAN on Windows Box

2011-08-25 Thread Emeka
'pTk/tkPort.h' assume made Cannot find 'pTk/tkInt.h' assume made Cannot find 'pTk/tkWinInt.h' assume made Finding dependencies for tixGlue.c Cannot find 'pTk/tixInt.h' assume made Cannot find 'pTk/tixImgXpm.h' assume made Cannot find 'pTk/tkWi

Re: CPAN on Windows Box

2011-08-25 Thread Emeka
I am thinking that this may be from my make On Thu, Aug 25, 2011 at 8:02 AM, Emeka wrote: > I added prefs folder inside .cpan > > It worked, that is I was able to download. However, I got some error > message toward the end . > > > > Finding dependencies for strGlue.c &

Image Modules

2011-08-25 Thread Emeka
Hello All, I want to re-size and edit images. Which module would you advise? Emeka -- *Satajanus Nig. Ltd *

Re: how to reverse string in perl?

2011-08-30 Thread Emeka
s time we explain our codes ... I don't think that Narasimha will easily wrap his head around the first two. Regards, Emeka On Tue, Aug 30, 2011 at 4:30 PM, Rob Dixon wrote: > On 30/08/2011 16:02, Shawn H Corey wrote: > >> On 11-08-30 05:38 AM, Narasimha Madineedi wrote: >>

Re: how to reverse string in perl?

2011-08-30 Thread Emeka
, $str; Rob Dixon > > It is time we explain our codes ... I don't think that Narasimha will > easily wrap his head around the first two. > (Once again Emeka, please bottom-post your responses and edit what you are quoting to what is relevant. Thanks :) I agree. It is a shame that

My Blog on Perl

2011-09-02 Thread Emeka
Hello All, I have written a blog on Perl. It just has basic stuff. I would want you to go through and comment. That way it will help me to re-enforce what I have learned. Regards, Emeka

Fwd: My Blog on Perl

2011-09-02 Thread Emeka
Hello All, I have written a blog on Perl. It just has basic stuff. I would want you to go through and comment. That way it will help me to re-enforce what I have learned. http://emekamicro.blogspot.com/2011/09/perl-here-i-come.html Regards, Emeka

Re: My Blog on Perl

2011-09-02 Thread Emeka
> >> > Could you please post the link? My eyes are not as good as they once were > and I have trouble see it from this distance. :) > It was because of my poor sight too. http://emekamicro.blogspot.com/2011/09/perl-here-i-come.html > > > > -- > Just my 0.0002 million dollars worth, > Shawn

Assigning to Substr

2011-09-06 Thread Emeka
Hello All, Could someone explain what Perl does behind here? Assign to Substring.. substr($string, 0 , 5) = 'Greetings'; Regards, Emeka -- *Satajanus Nig. Ltd *

Re: Assigning to Substr

2011-09-06 Thread Emeka
On Tue, Sep 6, 2011 at 1:19 PM, Shawn H Corey wrote: > On 11-09-06 08:04 AM, Emeka wrote: > >> Hello All, >> >> Could someone explain what Perl does behind here? >> >> Assign to Substring.. >> substr($string, 0 , 5) = 'Greetings'; >&

Re: Assigning to Substr

2011-09-07 Thread Emeka
Rob, I want to check out the C code. Kindly mail it to my box. Have a great day! Emeka On Wed, Sep 7, 2011 at 8:00 PM, Rob Dixon wrote: > On 06/09/2011 13:04, Emeka wrote: > >> >> Could someone explain what Perl does behind here? >> >> Assign to Substr

Re: Assigning to Substr

2011-09-07 Thread Emeka
Rob, Which C file should check out? Emeka On Wed, Sep 7, 2011 at 8:08 PM, Emeka wrote: > Rob, > > I want to check out the C code. Kindly mail it to my box. > Have a great day! > > Emeka > > > On Wed, Sep 7, 2011 at 8:00 PM, Rob Dixon wrote: > >&