#!/usr/bin/perl -w + package blah; sub new { my $class = shift; my $self = {}; bless $self, $class; return $self; } + sub print_dumb_question { my $self = shift; my $blat = $self->blat; print <<HERE I want blat to be the $blat not $self->blat() \n HERE ; } + sub blat { return ('correct value'); } + package main; my $dumb_problem = blah->new; $dumb_problem->print_dumb_question;
In reply to Printing accessor methods in here documents by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |