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 strin
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: beginners@perl.o
I’d go with Java, in order:
* Popularity – there is just more stuff being written in Java. This would
indicate the employment options are greater.
* https://www.tiobe.com/tiobe-index/
* Java currently rates 4th vs Perl at 27th
* Over the long arc, Java probably has a fas
things" command on your system.
-Original Message-
From: Claude Brown via beginners
Sent: Thursday, October 26, 2023 8:07 AM
To: Levi Elias Nystad-Johansen ; Andrew Solomon
Cc: Josef Wolf ; beginners@perl.org
Subject: RE: Using qr// with substitution and group-interpolation
Josef,
Inspired by Levi's “eval” idea, here is my solution:
sub substitute_lines {
my ($contents, $regex, $subst) = @_;
eval "\$contents =~ s/$regex/$subst/g";
return $contents;
}
$data = "foo whatever bar";
$data = &substitute_lines($data, qr/^foo (whatever) bar$/m, 'bar $1 baz');
p
I am 99% using “vi” and sometimes Notepad++.I do not like heavy-weight
IDE’s – I find they get in the way.
I have colleagues using Visual Studio and they say it is great. Yet, I’m more
productive 😊 I reckon they spend too much time messing around with the tool
trying to make it do what t
Steve,
I agree. Someone just starting out should go with Python. It pains me to say
it, but Perl isn’t a good skills investment.
My team and I program every day in Perl – we have 100’s of libraries and system
integrations. I love it and it is my first choice for backend work.Sadly,
we a
Hi Rick,
We use Net::SMTP to send emails via SendGrid. They require a user/pass
authentication over SSL and I wonder if that is what is going wrong in your
case. The other thing worth doing is checking the return-value of each SMTP
call as something may be going wrong silently.
Below is a fr
I’m in Australia, and it is much the same story. Perl is not mentioned
anymore, and it is difficult to find resources. You only need to look at the
various “popularity” reviews to see Perl is out of favour.
In my company we use Perl for most everything. Plus a little PHP & Javascript
for smal
This is where you need to pad spaces. So, for example:
- old: "I am young and fast\n" (20 bytes)
- new: "I am old and slow\n" (18 bytes)
The second version is shorter, so it will need two spaces before the newline:
- new: "I am old and slow__\n" (20 bytes; I put "_" instead of a space)
Th
That sounds positive. You should be able to avoid most of the overhead of
writing the file. The general idea is that you are "updating in place" rather
than writing out the whole file.
Something like below is what I was thinking, but it isn't tested! Make sure
you have a copy of your input
Do you have the option to "seek" to the correct place in the file to make your
changes? For example, perhaps:
- Your changes are few compared to writing out the whole file
- Your changes do not change the size of the file (or you can pad line-end with
spaces)
It is an edge case, but just a tho
> Can develop a program in PERL for GNU/Linux without using BASH?
Yes. But developing a script requires an editor of some sort. Most often
that will be launched from bash (or other shell), although I can imagine
strange scenarios where it is not.
Executing a perl script definitely does not r
13 matches
Mail list logo