Re: What is best way for learn programming?

2024-08-01 Thread karl
William Torrez Corea: >1. Course >2. Books >3. Documentation >4. Projects > > I was learning programming with a book but I quickly lost interest. My > progress is slow. If you loose interest, then think about why you did you try, do you really want to learn a programming language

Re: What is best way for learn programming?

2024-07-31 Thread Olivier
Jeff Pang via beginners writes: > I was leaning perl from the library of Spamassassin. :) That's a though one, SA is not the easiest piece of code! Olivier > > On 2024-08-01 09:37, i...@erickpaquin.com wrote: >> Best way like Olivier said is to do an actual real project or script >> that you

Re: What is best way for learn programming?

2024-07-31 Thread Jeff Pang via beginners
I was leaning perl from the library of Spamassassin. :) On 2024-08-01 09:37, i...@erickpaquin.com wrote: Best way like Olivier said is to do an actual real project or script that you (or someone else) will be using. Exercises in books never cover real life challenges fully or all the

Re: What is best way for learn programming?

2024-07-31 Thread info
Best way like Olivier said is to do an actual real project or script that you (or someone else) will be using. Exercises in books never cover real life challenges fully or all the different aspects and interactions that you'll face. Contributing to other projects is also another one... Erick

Re: What is best way for learn programming?

2024-07-31 Thread Olivier
William Torrez Corea writes: > 1 Course > 2 Books > 3 Documentation > 4 Projects My prefered way is to learn when I have an actual need. So until I have a programming project, I will not waste time to learne a new language. Olivier > > I was learning programming with a book but I quickly

Re: Can use Perl and C in a program?

2024-07-27 Thread karl
William Torrez Corea: > How can I implement these two languages of programming in a program? ... If you use `cmd`, system() etc. in perl, you are in fact calling another program that might be written in some other language. The same is true, using fork() exec() system() etc. in c, you could

Re: Can use Perl and C in a program?

2024-07-26 Thread Jeff Pang via beginners
On 2024-07-27 01:11, William Torrez Corea wrote: How can I implement these two languages of programming in a program? You want to check the following library. https://metacpan.org/dist/Inline-C/view/lib/Inline/C.pod -- regards, Jeff Pang -- To unsubscribe, e-mail:

Can use Perl and C in a program?

2024-07-26 Thread William Torrez Corea
How can I implement these two languages of programming in a program? What part of the program uses Perl and C? Different repositories of Github use many languages of programming in a project but a program only uses a language of programming. -- With kindest regards, William. ⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢠⠒⠀⣿⡁

Re: First line of input file not accessible.

2024-07-17 Thread David Precious
On Wed, 17 Jul 2024 17:41:22 +1000 Peter West via beginners wrote: [...] > $ cat print_file > #!/usr/bin/perl -n > while (<>) { > print "$. $_"; > } > exit; [...] > What happened to line 1? It's eaten by the `while (<>) { ... }` loop that is wrapped around your program because you used `-n`

First line of input file not accessible.

2024-07-17 Thread Peter West via beginners
$ uname -a Darwin Rosie.local 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:16:51 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T8103 arm64 $ locale LANG="en_AU.UTF-8" LC_COLLATE="en_AU.UTF-8" LC_CTYPE="en_AU.UTF-8" LC_MESSAGES="en_AU.UTF-8" LC_MONETARY="en_AU.UTF-8"

Re: algorithms

2024-06-28 Thread karl
William Torrez Corea: > What is the difference between computer algorithms, pseudocode and source > code? I think this explains that: https://en.wikipedia.org/wiki/Algorithm https://en.wikipedia.org/wiki/Pseudo_code https://en.wikipedia.org/wiki/Source_code Regards, /Karl Hammar -- To

algorithms

2024-06-28 Thread William Torrez Corea
What is the difference between computer algorithms, pseudocode and source code? How can I implement an algorithm in my project or source code? The majority of the time the algorithm is copied in pseudocode or mathematically in books or documentation (Greek symbology). An equation, operation can

Re: regex matching statements

2024-06-19 Thread Levi Elias Nystad-Johansen via beginners
Hi, Yes, they are the same. I like to use $_ only when the data comes in $_ naturally. Like in a for loop: for (qw< abc >) { if ( !/\w+\d+/ ) { print "not matched"; } } Otherwise, I have to write $_, then I prefer to name the variable something descriptive instead. Makes the code

regex matching statements

2024-06-18 Thread Jeff Peng via beginners
Hello list, are these statements the same in perl? $ perl -le '$_="abc";if (!/\w+\d+/){print "not matched"}' not matched $ perl -le '$_="abc";if ($_ !~ /\w+\d+/){print "not matched"}' not matched or which is the better one? Thanks. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org

Re: Easiest Way in Perl to check Whether a Disk is Mounted

2024-06-06 Thread Jesús Lozano Mosterín
El 5/6/24 a las 22:28, Mike escribió: I sure couldn't figure out how to test for a mount with that module.  And I did go to 'man 2 mount'. Still couldn't figure it out. Mike On 6/1/24 18:29, Jeff P via beginners wrote: Of course, I can use system calls and call the unix mount or

Re: Easiest Way in Perl to check Whether a Disk is Mounted

2024-06-05 Thread karl
You can check if something is mounted by comparing which device a specific directory is on and comparing it to its parent directory. $ cat chk_mount.pl #!/usr/bin/perl -w use strict; use Fcntl ':mode'; my $A = $ARGV[0] // "/"; my $B = $ARGV[1] // "/var"; my @Ast = stat $A; my @Bst = stat $B;

Re: Easiest Way in Perl to check Whether a Disk is Mounted

2024-06-05 Thread Will Mengarini via beginners
* Martin McCormick [24-06/01=Sa 09:25 -0500]: > [...] determine whether a file system is mounted such as > $ mount |grep horseradish > [...] I think perl -e 'print grep m[/horseradish],`mount`' is hard to beat for its simplicity. Note I'm using Perl's built-in grep; there's no need to run the

Re: Easiest Way in Perl to check Whether a Disk is Mounted

2024-06-05 Thread Mike
I sure couldn't figure out how to test for a mount with that module.  And I did go to 'man 2 mount'. Still couldn't figure it out. Mike On 6/1/24 18:29, Jeff P via beginners wrote: Of course, I can use system calls and call the unix mount or mountpoint applications but is there a proper

Re: Easiest Way in Perl to check Whether a Disk is Mounted

2024-06-01 Thread Jeff P via beginners
Of course, I can use system calls and call the unix mount or mountpoint applications but is there a proper perl way to do this since system calls are not as elegant? Thank you. How about this module from metacpan? https://metacpan.org/pod/Sys::Linux::Mount regards. -- To unsubscribe,

Easiest Way in Perl to check Whether a Disk is Mounted

2024-06-01 Thread Martin McCormick
In unix-like OS's, there are the mount and mountpoint commands that can help one determine whether a file system is mounted such as $ mount |grep horseradish. If there is a file system defined in fstab which might look like UUID="B159-BB80" /horseradish vfat rw,user,noauto 0 0 and it

Re: how to can measure my level of knowledge?

2024-05-31 Thread Rob Coops
Hi William, Here are my two cents after nearly 30 years of writing code in many different languages. Writing in any functional language is exactly the same as in every other functional language. The easiest way to learn and improve is by learning to break down your problem into manageable steps.

how to can measure my level of knowledge?

2024-05-30 Thread William Torrez Corea
I code but my logic is weak, i code 1000 lines of code but I don't understand the logic of the program. Can write 10 lines of code, get the result but I don't understand the concept. Can code the program but I can't interpret. My mentor told me: understand the concept because I talk nonsense. --

Re: crypt

2024-05-25 Thread Zheng Li Sheng
Hi, Maybe not being compiled with libcrypt ? What is the output of "perl -V | grep --color -i crypt" and "ldd /home/masayoshi/localperl/bin/perl" ? Regards, On Sat, May 25, 2024 at 4:00 PM Masayoshi Fujimoto wrote: > Hi. > OpenBSD does not work crypt. > Does it depends on OSes ? > Do you know

crypt

2024-05-25 Thread Masayoshi Fujimoto
Hi.OpenBSD does not work crypt.Does it depends on OSes ?Do you know why I can not use it ? Perl uses the following crypt?https://man.openbsd.org/crypt # My crypt.pluse strict;use warnings;use v5.10;say crypt("Ava Max", "Salt");  FreeBSD works crypt.pl% perl -vThis is perl 5, version 36, subversion

Re: project

2024-05-18 Thread karl
William: > What is the need to develop a project in Perl? Perl and some knowledge of what the project is about. You can, at your own convenience or requirement, add some version control system, some editor or progremming environment, etc. Regards, /Karl Hammar -- To unsubscribe, e-mail:

Re: module dependency

2024-05-16 Thread sisyphus
At the command prompt, run: perl -le 'use Net::SMTPS; print for keys %INC;' That will tell you the names of all of the modules that get loaded when you load Net::SMTP. Cheers, Rob On Thu, May 16, 2024 at 11:07 PM Netwinds wrote: > greetings everybody, > > How do I know which other modules are

Re: module dependency

2024-05-16 Thread karl
Netwinds: > How do I know which other modules are required by the perl module > (like Net::SMTPS) I am using? You mean like go to cpan: https://metacpan.org/pod/Net::SMTPS and looking at the left column under dependencies ? Regards, /Karl Hammar -- To unsubscribe, e-mail:

module dependency

2024-05-16 Thread Netwinds
greetings everybody, How do I know which other modules are required by the perl module (like Net::SMTPS) I am using? Thanks -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: stage of programming

2024-05-14 Thread Misti Hamon
So, uh, this depends. The couple of times I went through the process of working for a "client" (in quotes because it was in school, and was an exercise they did trying to teach us about freelancing) it was handled two ways - client finds you and says "I need a program that takes this information

Re: lines of code for code a website

2024-05-03 Thread Levi Elias Nystad-Johansen via beginners
This depends on the complexity and size of the website. A very simple website needs 0 lines of C, Java, PHP, or Perl - since it can be made with only HTML. Big and complex websites might need 100.000s lines of code, in multiple languages. -L On Friday, May 3rd, 2024 at 8:27 AM, William Torrez

lines of code for code a website

2024-05-03 Thread William Torrez Corea
How many lines of code are needed to code a website? *in c, java, php and perl * What language is ideal for this task? -- With kindest regards, William. ⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system ⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org ⠈⠳⣄

Re: [announcements mailing list]

2024-03-20 Thread Mike
I am subscribed to the Perl Weekly: https://perlweekly.com/ Mike On 3/15/24 06:27, Maxim Abalenkov wrote: Dear all, How are you? I hope all is well with you. I’m wondering, do we have some kind of an announcements mailing list, that would highlight, what happened in the Perl world over

Re: [announcements mailing list]

2024-03-15 Thread sisyphus
On Fri, Mar 15, 2024 at 10:27 PM Maxim Abalenkov wrote: > Dear all, > > How are you? I hope all is well with you. I’m wondering, do we have some > kind of an announcements mailing list, that would highlight, what happened > in the Perl world over the past week, month, quarter? What are the new >

Re: [announcements mailing list]

2024-03-15 Thread Andrew Solomon
Hi Maxim, This is the mailing list I see as a good source of general updates from the Perl and Raku community: https://perlweekly.com/ This is a more formal news site maintained by The Perl Foundation: https://news.perlfoundation.org/ This site was once providing lots of articles but needs

Re: Upgrade from Debian 11 to Debian 12 Broke Perl.

2024-03-13 Thread Ruprecht Helms (privat)
In the case you built up perl via source for updating by using the tarball the following line is nessesarry: |sudo apt install build-essential wget It seams for the packages you need to install the warning-unused-0.06. Maybe you can install it via the debian-procedure or by using the tarball.

Re: Upgrade from Debian 11 to Debian 12 Broke Perl.

2024-03-13 Thread Ruprecht Helms (privat)
Hi, what is saying the following: perl -v   ?? Maybe the below mentioned version needs an update. In this case do the following: |sudo apt update ||sudo apt install perl ||sudo apt install perl libdatetime-perl libjson-perl After that have a look at perl-packages you need ||apt-cache

Re: Upgrade from Debian 11 to Debian 12 Broke Perl.

2024-03-11 Thread John SJ Anderson
> Can't locate warnings/unused.pm in @INC (you may need to install the > warnings::unused module) (@INC contains: /etc/perl > /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 > /usr/lib/x86_64-linux-gnu/perl5/5.36 /usr/share/perl5 > /usr/lib/x86_64-linux-gnu/perl-base

Upgrade from Debian 11 to Debian 12 Broke Perl.

2024-03-11 Thread Martin McCormick
I am asking this to hold collateral damage to a minimum, collateral damage in this case being all the stupid things we do when stuff breaks and documentation isn't clear about what is the shortest and safest path to restore functionality. I upgraded a debian bullseye system to debian

Re: [install and use local::lib module]

2024-02-17 Thread Mike
Hello Maxim, I say $HOME/perl5 (~/perl5) is where my personally installed modules are located. Actually in ~/perl5/lib/perl5/ I am less sure about $HOME/.cpan (~/.cpan), but I think that is where the cpan settings are stored.  But looking inside it suggests it is more than just settings.

Re: [install and use local::lib module]

2024-02-15 Thread Kang-min Liu
Maxim Abalenkov writes: > Now everything works. But I still don’t understand the setup very > well. What is the difference between the ‘.cpan’ and ‘perl5’ > directories? What is their purpose? Thank you and have a great day > ahead! The directory ~/.cpan/ is where the command `cpan` saves its

[install and use local::lib module]

2024-02-15 Thread Maxim Abalenkov
Dear all, How are you? I hope all is well with you. I need help please. I recently moved to a new laptop and installed Perl 5.38.2 from source. I would like to discipline myself and learn how to use the ‘local::lib’ module properly. I downloaded the source code of local::lib from cpan website

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

2024-02-09 Thread Mike
I don't. Mike On 1/31/24 16:51, hw wrote: Ok and how do you do it with OpenOffice::OODoc? -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

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

2024-01-31 Thread hw
On Tue, 2024-01-30 at 20:45 -0600, Mike wrote: > FWIW, in Spreadsheet::WriteExcel I do this: Ok and how do you do it with OpenOffice::OODoc? > $sheet = $book1 -> worksheets(2) -> {Name}; > $sheet = $book1 -> worksheets($sheet); > $sheet -> Activate; > > $sheet -> Range("B2") -> Activate; > $ex

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

2024-01-30 Thread Mike
FWIW, in Spreadsheet::WriteExcel I do this: $sheet = $book1 -> worksheets(2) -> {Name}; $sheet = $book1 -> worksheets($sheet); $sheet -> Activate; $sheet -> Range("B2") -> Activate; $ex -> ActiveWindow -> {FreezePanes} = "True"; Mike On 1/28/24 16:26, hw wrote: So how do I freeze

Re: Are there any ALSA Perl Modules?

2024-01-29 Thread sisyphus
On Mon, Jan 29, 2024 at 6:28 AM Martin McCormick wrote: [snip] > I may be looking in the wrong places but, so far, I seem > to be batting zeros when looking for perl and alsa together. > I take it that MIDI::ALSA (https://metacpan.org/pod/MIDI::ALSA) has little or nothing to offer ?

Re: Are there any ALSA Perl Modules?

2024-01-29 Thread Olivier
Shlomi Fish writes: >> Anyway, the FFI concept will probably someday come in >> handy for a different project so I will continue with the C I was >> working on. What I did in a project is having the main functionality written in C, but using Perl for things that could be handy like parsing

Re: Are there any ALSA Perl Modules?

2024-01-29 Thread Shlomi Fish
hi Martin, On Mon, 29 Jan 2024 22:38:27 -0600 "Martin McCormick" wrote: > Shlomi Fish writes: > > hi Martin, > > you can try using an FFI, eg: > > > > https://metacpan.org/dist/Inline-C/view/lib/Inline/C.pod > > > > https://metacpan.org/dist/Inline-Python/view/Python.pod > > > >

Re: Are there any ALSA Perl Modules?

2024-01-29 Thread Martin McCormick
Shlomi Fish writes: > hi Martin, > you can try using an FFI, eg: > > https://metacpan.org/dist/Inline-C/view/lib/Inline/C.pod > > https://metacpan.org/dist/Inline-Python/view/Python.pod > > https://metacpan.org/pod/FFI::Platypus Many thanks. I am glad I asked the question but it has taken me

Re: Are there any ALSA Perl Modules?

2024-01-28 Thread Shlomi Fish
hi Martin, On Sun, 28 Jan 2024 13:27:45 -0600 "Martin McCormick" wrote: > Several years ago, I wrote some C code which turns one's > computer's sound interface in to a sound-activated recorder that > I could then connect to radio receivers or microphones and record > when audio started and stop

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

2024-01-28 Thread hw
On Sun, 2024-01-28 at 22:44 +0100, hw wrote: > Hmm, cellValue() always puts text. How do I put numbers and formulars > instead? Ok, it's cellFormula(), and you have to change the value type of every cell that should contain anything having a type different from the default type of the sheet.

Re: Are there any ALSA Perl Modules?

2024-01-28 Thread hw
On Sun, 2024-01-28 at 13:27 -0600, Martin McCormick wrote: > [...] > I may be looking in the wrong places but, so far, I seem > to be batting zeros when looking for perl and alsa together. > > Any good ideas are greatly appreciated, here. I would think that one nowadays would use (go

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

2024-01-28 Thread hw
On Sun, 2024-01-28 at 12:21 -0800, Jim Gibson via beginners wrote: > 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

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

Are there any ALSA Perl Modules?

2024-01-28 Thread Martin McCormick
Several years ago, I wrote some C code which turns one's computer's sound interface in to a sound-activated recorder that I could then connect to radio receivers or microphones and record when audio started and stop recording when there is nothing but silence. One essentially sets a sound card to

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

2024-01-28 Thread hw
On Thu, 2024-01-25 at 20:28 -0600, Mike wrote: > It can be done with a Perl module: > https://unix.stackexchange.com/questions/723650/editing-libreoffice-calc-spreadsheets-in-the-terminal > > I have not tested that. I do not want to edit spreadsheets in a terminal. There's some other software

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

2024-01-25 Thread Mike
It can be done with a Perl module: https://unix.stackexchange.com/questions/723650/editing-libreoffice-calc-spreadsheets-in-the-terminal I have not tested that. Mike On 1/25/24 13:05, hw wrote: Hi, is there a way to create libreoffice spreadsheets (ods) similar to Excel::Writer::XLSX?

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

2024-01-25 Thread hw
Hi, is there a way to create libreoffice spreadsheets (ods) similar to Excel::Writer::XLSX? There is OpenOffice::OODoc and I don't see how to create spreadsheet documents with that. Is there still no way to do that? -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional

Re: regex

2024-01-24 Thread karl
Mike: > I stand properly scolded. I didn't want to scold anyone, it seems I expressed myself wrong. Sorry for that. Regards, /Karl Hammar -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: regex

2024-01-23 Thread Mike
I stand properly scolded. Mike On 1/23/24 07:01, k...@aspodata.se wrote: Please stop using my mail address when replying, I'm on the list and don't want two copies of the same mail (it's not about you Mike). -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional

Re: regex

2024-01-23 Thread karl
Please stop using my mail address when replying, I'm on the list and don't want two copies of the same mail (it's not about you Mike). Mike > Why is my Perl not working on that command? > > $ perl -e 'exit(10) if "aaa"=~/a{,2}/;' > Unescaped left brace in regex is illegal here in regex; marked

Re: regex

2024-01-22 Thread Mike
Why is my Perl not working on that command? $ perl -e 'exit(10) if "aaa"=~/a{,2}/;' Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/a{ <-- HERE ,2}/ at -e line 1. $ But this works: $ perl -e 'exit(10) if "aaa"=~/a{0,2}/;' $ $ echo $? 10 $ It sure surprised

Re: regex

2024-01-22 Thread armando perez pena
Hi, Sometimes the large path is the shortest one. Go through the tutorial in Perl for regular expressions and you will solve your questions and you will learn a lot. About regular expressions are two points of view. First one says that you must learn and use it. The other point of is: if you

RE: regex

2024-01-22 Thread Claude Brown via beginners
Jorge, Expanding on Karl's answer (and somewhat labouring his point) consider these examples: $a =~ /Jorge/ $a =~ /^Jorge/ $a =~ /Jorge$/ $a =~ /^Jorge$/ This shows that regex providing four different capabilities: - detect "Jorge" anywhere in the string - detect "Jorge" at the start of a

Re: regex

2024-01-22 Thread Levi Elias Nystad-Johansen via beginners
I agree that this is confusing, and I think many resources describing regex in unhelpful ways is partly to blame. descriptions like "pattern that matches against a string" and similar. this implies that a regex has to match the string, but this is not the case. a regex does not have to match the

Re: regex

2024-01-22 Thread Andy Bach
Yes, the {}l RE modifier has the canonical form {a,b} where a and b are numbers and so that modifies the char before it to match from a to b times, e,g A{1,3} matches one, two or three As. If you leave out the first number, zero is presumed. Hmm, perl 5.30 % perl -E 's ay(10) if "aaa"=~/a{,2}/;'

Re: regex

2024-01-22 Thread karl
Jorge Almeida: > On Mon, 22 Jan 2024 at 13:00, wrote: > > Jorge Almeida: > > > $ perl -e 'exit(10) if "aaa"=~/a{,2}/;' ... > > {,n}Match at most n times ... > Yes, I read it (several times). I still don't understand it (I understand > what you're saying, and I trust you're right, I just

Re: regex

2024-01-22 Thread karl
Jorge Almeida: > Please help me to understand this: > $ perl -e 'exit(10) if "aaa"=~/a{,2}/;' > $ echo $? > $ 10 In man perlre, under "Regular Expressions" it says: {,n}Match at most n times So /a{,2}/ matches "", "a", and "aa" and is ignorant about what comes before and after

regex

2024-01-22 Thread Jorge Almeida
Please help me to understand this: $ perl -e 'exit(10) if "aaa"=~/a{,2}/;' $ echo $? $ 10 Thanks Jorge Almeida

RE: Using UNIX domain sockets

2024-01-15 Thread Claude Brown via beginners
The first difference I can see is that "echo" adds a newline, but your perl does not. Try adding the newline: my $cmd='{"command":["stop"]}' . "\n"; This is a wild guess! -Original Message- From: listas.correo via beginners Sent: Tuesday, January 16, 2024 6:26 AM To:

Using UNIX domain sockets

2024-01-15 Thread listas.correo
Hi, I am trying to control mpv player using unix sockets but it looks like that perl is unable to send the string correctly. I run the following command: mpv --input-ipc-server=~/mpv.sock --idle=yes -v -v If I sent the string using system commands: $ echo '{"command":["stop"]}' | socat -

Re: How to reboot?

2024-01-15 Thread hw
On Sat, 2024-01-13 at 22:53 +, Tim Lewis via beginners wrote: > To send email to text for the main carriers in the US: > AT > Compose a new email and enter the recipient's 10-digit wireless number, > followed by @txt.att.net. > T-Mobile > Write a new email message. > Enter the recipients

Re: How to reboot?

2024-01-13 Thread Lars Noodén via beginners
If you go the e-mail route for signalling, you can have Perl scripts on both ends using Crypt::OpenPGP to sign and/or encrypt the commands. Other options like XMPP were mentioned. Maybe one of the MQTT modules would be suitable. /Lars -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org

Re: How to reboot?

2024-01-13 Thread hw
On Sat, 2024-01-13 at 17:09 +, Tim Lewis via beginners wrote: > You bring an excellent point about the ability to spoof the email address. > In my case the email that for the server is not made public, but that is a > vulnerability. I will have to read up on pwgen. That sounds like a good >

Re: lambda array

2024-01-13 Thread Ken Slater
On Sat, Jan 13, 2024 at 12:41 PM Andrew Solomon wrote: > > when is an array in perl declared with [] instead of ()? > > Using the [ ] delimiters you are creating a *reference* to an array. > (Think of a reference as the memory address where the array is stored). So > > my $foo = [1,2,3]; > > is

Re: lambda array

2024-01-13 Thread Andrew Solomon
> when is an array in perl declared with [] instead of ()? Using the [ ] delimiters you are creating a *reference* to an array. (Think of a reference as the memory address where the array is stored). So my $foo = [1,2,3]; is equivalent to the following, because given an array the \ gets the

Re: lambda array

2024-01-13 Thread hw
On Sat, 2024-01-13 at 15:00 +, Andrew Solomon wrote: > I think the line: > > reply_multi( \$daemon{xmpp_o}, \($adminuser{fromJID}, $fromJID), "blah" ); > > should have \(...) replaced with [ ... ] : > > reply_multi( \$daemon{xmpp_o}, [$adminuser{fromJID}, $fromJID], "blah" ); > > because

Re: How to reboot?

2024-01-13 Thread hw
On Sat, 2024-01-13 at 08:49 -0600, twlewis via beginners wrote: > Hi hw, I had a similar situation in which I travelled. I wanted to > lock down the ufw firewall but be able to allow certain IP addresses > based on the hotel IP or my cell service IP. To that I developed > Perl that would check

Re: How to reboot?

2024-01-13 Thread hw
On Sat, 2024-01-13 at 10:24 +0530, Andinus via beginners wrote: > hw @ 2024-01-12 18:49 +01: > > > Thanks, I thought about sudo and figured it needs a password being > > entered. If that works without, I'll start programming and test if > > something else gets in the way :) > > You can

Re: lambda array

2024-01-13 Thread Andrew Solomon
I think the line: reply_multi( \$daemon{xmpp_o}, \($adminuser{fromJID}, $fromJID), "blah" ); should have \(...) replaced with [ ... ] : reply_multi( \$daemon{xmpp_o}, [$adminuser{fromJID}, $fromJID], "blah" ); because \('foo', 'bar') evaluates to (\'foo', \'bar') Does that clarify this for

lambda array

2024-01-13 Thread hw
Hi, how do I pass an array that is created on the fly as one parameter of a function? Example: use feature 'signatures'; no warnings 'experimental::signatures'; sub reply_multi ( $xmpp_o, $rcpts, $msg ) { foreach my $rcpt (@$rcpts) { $$xmpp_o->MessageSend( type => 'chat', to =>

RE: How to reboot?

2024-01-13 Thread twlewis via beginners
Hi hw, I had a similar situation in which I travelled. I wanted to lock down the ufw firewall but be able to allow certain IP addresses based on the hotel IP or my cell service IP. To that I developed Perl that would check my smtp account. The script is controlled through a cron job that

Re: How to reboot?

2024-01-12 Thread Andinus via beginners
hw @ 2024-01-12 18:49 +01: > Thanks, I thought about sudo and figured it needs a password being > entered. If that works without, I'll start programming and test if > something else gets in the way :) You can configure sudo to not ask for a password. -- To unsubscribe, e-mail:

Re: How to reboot?

2024-01-12 Thread hw
On Fri, 2024-01-12 at 21:39 +0530, Andinus via beginners wrote: > hw @ 2024-01-12 14:16 +01: > > > But how can I reboot/restart the computer from the xmpp client? I > > don't want the xmpp client to run as root all the time. I would use > > something like > > > > > > system('shutdown', '-r',

Re: How to reboot?

2024-01-12 Thread Andinus via beginners
hw @ 2024-01-12 14:16 +01: > But how can I reboot/restart the computer from the xmpp client? I > don't want the xmpp client to run as root all the time. I would use > something like > > > system('shutdown', '-r', 'now'); > > > in the xmpp client, and that does require root privileges. To make

How to reboot?

2024-01-12 Thread hw
Hi, I would like to write a program (daemon) which will be automatically started by systemd at boot which will allow me to reboot or restart my computer through commands sent via xmpp. The xmpp part (xmpp client) and starting that program is no problem. But how can I reboot/restart the computer

Re: [getting PAUSE account]

2024-01-12 Thread Andrew Solomon
Hi Maxim, I'm sorry to hear this hasn't been resolved! I've just asked on the perl-help irc.perl.org channel - feel free to join in, but otherwise I'll let you know what I learn. Kind regards, Andrew On Fri, Jan 12, 2024 at 6:00 AM Maxim Abalenkov wrote: > Dear all, > > How are you? Thank

Re: Knowledge for a basic programmer and advanced programmer

2024-01-05 Thread John SJ Anderson
> If you are coding you should be backing up every > 10 minutes or more often. And you should store > a "historical" full copy of the code every 30 minutes > or more often and save them for days. No, you shouldn’t, because it is no longer 1985. You should learn how to use version control; the

Re: Knowledge for a basic programmer and advanced programmer

2024-01-05 Thread Mike
If you are coding you should be backing up every 10 minutes or more often.  And you should store a "historical" full copy of the code every 30 minutes or more often and save them for days. Mike On 1/2/24 10:33, William Torrez Corea wrote: On Tue, Jan 2, 2024 at 5:17 AM Shlomi Fish wrote:

Re: [getting PAUSE account]

2024-01-02 Thread Rob Coops
Just my two cents on this. There is no sense in putting one language over another if it is for personal use. In those cases use what you want and what you feel is best suited to your needs. You might Choose Perl as you are familiar with it and you need to process lots and lots of text for your

Re: Knowledge for a basic programmer and advanced programmer

2024-01-02 Thread Shlomi Fish
On Sat, 16 Dec 2023 08:10:49 -0600 William Torrez Corea wrote: > What needs to know a basic and advanced programmer? > > I am a basic programmer, I don't have enough experience to be an advanced > programmer. > > How many years of experience must an advanced programmer have? > hi William, I

Re: [getting PAUSE account]

2024-01-01 Thread Mike
That is true.  I don't see the appeal with Python, but I have barely dabbled in it.  I code for me and I know Perl.  I don't have the motivation to learn a new language. Perl works well, so I use it. Mike On 12/25/23 22:05, William Torrez Corea wrote: I am a beginner, I am learning of the

Re: [getting PAUSE account]

2023-12-25 Thread Mike
Great question.  I think I did see that Pause accounts were going away soon, but I'm not sure that has taken place yet.  I just signed into my Pause account and I don't see anything about them being retired. This 3 year old post says it takes a bit of time:

[getting PAUSE account]

2023-12-23 Thread Maxim Abalenkov
Dear all, How are you? I hope all is well with you. I’m reading the ‘Intermediate Perl’ textbook. It suggests applying for a PAUSE account. I applied a couple of days ago using the link listed in the book. However, I still haven’t received any reply. Am I doing something wrong? Shall I be more

Knowledge for a basic programmer and advanced programmer

2023-12-16 Thread William Torrez Corea
What needs to know a basic and advanced programmer? I am a basic programmer, I don't have enough experience to be an advanced programmer. How many years of experience must an advanced programmer have? -- With kindest regards, William. ⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system

Re: perlbrew

2023-11-22 Thread Olivier
Hi, > > Try to change the version of my Perl but not change. What do you do to change the version of Perl? What command? On what system? > I have Perl v5.36.1, I tried to change Perl to Perl v5.10.0 but I didn't get > the > desired effect. > > I have the following error: > > A sub-shell is

perlbrew

2023-11-22 Thread William Torrez Corea
Try to change the version of my Perl but not change. I have Perl v5.36.1, I tried to change Perl to Perl v5.10.0 but I didn't get the desired effect. I have the following error: A sub-shell is launched with perl-5.10.0 as the activated perl. Run 'exit' > to finish it. > -- With kindest

Re: Using qr// with substitution and group-interpolation in thesubstitution part

2023-11-21 Thread gordonfish
On 10/25/23 10:32, Josef Wolf wrote: [...] Basically, I want to do the same as $data =~ s/^foo (whatever) bar$/bar $1 baz/mg; but with a different interface (because it has to be embedded into a bigger project), So I have come with this; sub substitute_lines { my ($contents,

Re: Perl Design Patterns

2023-11-18 Thread wesley
you can choose to not use it. > > When must I use perl design patterns? > -- > > With kindest regards, William. > > ⢀⣴⠾⠻⢶⣦⠀ > ⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system > ⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org https://www.debian.org/ > ⠈⠳⣄ > -- To unsubscribe, e-mail:

Over-productive or improductive

2023-11-06 Thread William Torrez Corea
What is the best option for work in software development? *My weak * 1. I am *over-productive * 2. I have impostor syndrome 3. I have burnout 4. My learning curve is slow -- With kindest regards, William. ⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system ⢿⡄⠘⠷⠚⠋⠀

Re: Preference

2023-10-30 Thread Rob Coops
In this day and age Kotlin is probably your best bet but if you take on Java you are 90% there with regards to Kotlin. As for Perl, unless you are in a very specific niche Perl is pretty much dead as a commercially viable option as there are too few people that are halfway decent at it so no

  1   2   3   4   5   6   7   8   9   10   >