develooper Front page | perl.beginners | Postings from August 2022

Re: What is the mean of the following syntax?

Thread Previous | Thread Next
armando perez pena
August 3, 2022 10:44
Re: What is the mean of the following syntax?
Message ID:
Hello William,

Perl is a programming language easy to use an relative easy to learn. But is very very tricky.

The best way to learn is get a good book . Like 'Learning Perl' and read the book and practice.

If you do not do that you will find a huge amount of special variables with stranges characters. Even google can't answer the meaning of these variables sometimes.

So my more safety and sincere advice is to start with a book. If it is too much for you now. Then go for Perl tutorials in Perl documentation. Start with perl intro for example.

!~ /\*/

!~ mean negation, opposite to =~

// Are the delimiter for regural espresion

\ mean scape character. Here * has a meaning in regular expression world. So use \* meant use directly * character.

All together. The if is true only if $extesinbdoes not contain *.

Best Regards,
Armando Pérez Peña

De: William Torrez Corea <>
Enviado: miércoles, 3 de agosto de 2022 8:41
Para: <>
Asunto: What is the mean of the following syntax?

Mean: !~ /\*/

I have the following code:

if ($extension !~ /\*/) {
$backup = $ARGV . $extension;


With kindest regards, William.

⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About