Re: Subroutine return value

2025-05-14 Thread Jim Gibson via beginners
Put this line as the last line executed in your subroutine: return $sum; That makes it explicit as to what you want the subroutine to do. Don’t depend upon some obscure behavior of Perl to save a few keystrokes. Your program will be better for it. > On May 14, 2025, at 4:15 PM, Daryl

Re: Linux Directory Copy Modules that Won't

2025-02-01 Thread Jim Gibson via beginners
> On Feb 1, 2025, at 6:34 AM, Martin McCormick wrote: > > This is perl 5, version 36, subversion 0 (v5.36.0) built for > x86_64-linux-gnu-thread-multi > (with 53 registered patches, see perl -V for more detail) > > Copyright 1987-2022, Larry Wall > > The issue here is trying to copy directo

Re: https://metacpan.org/pod/OpenOffice::OODoc

2024-01-28 Thread Jim Gibson via beginners
Check out the OpenOffice::OODoc module on CPAN: The documentation is a little sparse, especially with regard to “spreadsheet” mode, and I don’t have Libre Office on my system to test it out, but the following code produces an ods file that can

Re: help with making an sftp connection

2023-04-16 Thread Jim Gibson via beginners
Perl has a repository of user-submitted modules called Comprehensive Perl Archive Network (CPAN). Net::SFTP::Foreign can be installed from there, and it looks like a good candidate, as does Net::SFTP. The two modules use different methods for invoking the SFTP protocol. I would try one and, if t

Re: A Regular Expression Problem in Perl 5.28

2023-03-29 Thread Jim Gibson via beginners
On Mar 28, 2023, at 3:00 PM, Martin McCormick wrote: > > Uri Guttman writes: >> yes, but he kept the {5,} repeat count. so i just kept it too. > > Now that I know how this works, I will probably change to > {4,} as this would match 4 or more digits. From reading the > documentation, {4} means