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

Re: What is the mean of the following syntax?

Thread Previous | Thread Next
From:
armando perez pena
Date:
August 3, 2022 10:44
Subject:
Re: What is the mean of the following syntax?
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 <willitc9888@gmail.com>
Enviado: miércoles, 3 de agosto de 2022 8:41
Para: beginners@perl.org <beginners@perl.org>
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
⠈⠳⣄⠀⠀⠀⠀


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About