Re: What is the mean of the following syntax?

armando perez pena <[email protected]>
Newsgroups gmane.comp.lang.perl.beginners
Message-ID <VI1PR0102MB3631D40ACBC0BE351880487ADD9C9@VI1PR0102MB3631.eurprd01.prod.exchangelabs.com>
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 <[email protected]>
Enviado: miércoles, 3 de agosto de 2022 8:41
Para: [email protected] <[email protected]>
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
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀⠀⠀⠀
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.