Re: Is there a way to generate HTML reports?

2013-07-06 Thread Ron Weidner
Shaji, I've recently (6 months ago) created just such an application.  My approach was to create a simple template engine that supports 3 kinds of "tags".  The template engine will read a template file looking for these tags.  When a tag is found, the text for the tag is replaced by a some va

List Experience

2011-10-01 Thread Ron Weidner
I've had mixed feelings about my experience on this list so far. I'm sharing these opinions because I feel it would be awesome if this list seemed friendlier to beginners. Several years ago I subscribed to this list and unsubscribed almost as quick as I could. The harshness of the responses

Code organization .pm

2011-09-04 Thread Ron Weidner
I have a class named Widget in a file named Widget.pm.  I have another class named Table in a file called Table.pm.  Table extends Widget. --- package Widget; #file Widget.pm #insert a bunch of methods...   --- package Table; #file Table.pm use Widget; @ISA=("Widget"); #insert several method

more oop array

2011-09-03 Thread Ron Weidner
In a module I have code that looks like this... sub add_widget {     my $self = shift;     my $new_widget = shift;     push ( @{$self->{WIDGETS}}, $new_widget ); } sub get_widgets {     my $self = shift;     return $self->{WIDGETS}; } I'm writing a test that is failing at runtime with the follow

oop array question

2011-09-03 Thread Ron Weidner
I'm trying to add a object to an array of objects.  The code below is wrong. sub add_widget {     my $self = shift;     my $new_widget = shift;     push ( @($self->{WIDGETS}), $new_widget ); } Later, I'm going to need to iterate over the array of widgets.  How can I accomplish these 2 tasks?

Find and Replace in Textfile

2011-08-21 Thread Ron Weidner
Recently, I was asked to find the first occurrence of a word in a text file and replace it with an alternate word.  This was my solution.  As a new Perl programmer, I feel like this solution was too C like and not enough Perl like.  So, my question is what would have been the Perl like solution

Useless use of private variable

2011-08-20 Thread Ron Weidner
In the program below the "for loop"  is causing the warning... "Useless use of private variable in void context at ./uselessUse.pl line 16." If I comment out the "for loop" like this the warning goes away... #for($i; $i < $n; $i++) #{     push (@some_array, $i); #} What does the warning mean and