Re: Using array from subroutine - Thanks

2009-04-06 Thread Thomas H. George
On Sun, Apr 05, 2009 at 08:53:43AM -0700, John W. Krahn wrote: > Thomas H. George wrote: >> In order to call them from menubuttons I moved my code into subroutines. >> >> sub open_file { >> if ( ! open NEWFILE, "<$file") { >> die "Could Not Open $file: $!" >> } else { >>

RE: Using array from subroutine

2009-04-06 Thread Ajay Kumar
It's good for the beginners -Original Message- From: John W. Krahn [mailto:jwkr...@shaw.ca] Sent: Sunday, April 05, 2009 9:24 PM To: Perl Beginners Subject: Re: Using array from subroutine Thomas H. George wrote: > In order to call them from menubuttons I moved my code into sub

Re: Using array from subroutine

2009-04-05 Thread John W. Krahn
Thomas H. George wrote: In order to call them from menubuttons I moved my code into subroutines. sub open_file { if ( ! open NEWFILE, "<$file") { die "Could Not Open $file: $!" } else { my @lines = ; my() *creates* a new variable that is only vis

Using array from subroutine

2009-04-05 Thread Thomas H. George
In order to call them from menubuttons I moved my code into subroutines. sub open_file { if ( ! open NEWFILE, "<$file") { die "Could Not Open $file: $!" } else { my @lines = ; $message = "Open File" . $file; } } # End sub open