Загрузка...

Perl: inline variable substitution not working

Hello everyone! I hope this video has helped solve your questions and issues. This video is shared because a solution has been found for the question/problem. I create videos for questions that have solutions. If you have any other issues, feel free to reach out to me on Instagram: https://www.instagram.com/ky.emrah

Below, you can find the text related to the question/problem. In the video, the question will be presented first, followed by the answers. If the video moves too fast, feel free to pause and review the answers. If you need more detailed information, you can find the necessary sources and links at the bottom of this description. I hope this video has been helpful, and even if it doesn't directly solve your problem, it will guide you to the source of the solution. I'd appreciate it if you like the video and subscribe to my channel!Perl: inline variable substitution not working

Below is the perl script
my $var="
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
da:be:66:35:0e:47:0f:60:f1:70:a4:43:ff:39:da:65.
Please contact your system administrator.
Add correct host key in /home/PCS/.ssh/known_hosts to get rid of this message.
Offending key in /home/PCS/.ssh/known_hosts:144
Password authentication is disabled to avoid man-in-the-middle attacks.
Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/vg00-lscratch 7288301568 6079377352 1208924216 84% /scratch
";

$var =~ s/.+Filesystem/Filesystem/g;
print "$var\n";

my $var="
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
da:be:66:35:0e:47:0f:60:f1:70:a4:43:ff:39:da:65.
Please contact your system administrator.
Add correct host key in /home/PCS/.ssh/known_hosts to get rid of this message.
Offending key in /home/PCS/.ssh/known_hosts:144
Password authentication is disabled to avoid man-in-the-middle attacks.
Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/vg00-lscratch 7288301568 6079377352 1208924216 84% /scratch
";

$var =~ s/.+Filesystem/Filesystem/g;
print "$var\n";

What it is printing is ($var value):
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
da:be:66:35:0e:47:0f:60:f1:70:a4:43:ff:39:da:65.
Please contact your system administrator.
Add correct host key in /home/PCS/.ssh/known_hosts to get rid of this message.
Offending key in /home/PCS/.ssh/known_hosts:144
Password authentication is disabled to avoid man-in-the-middle attacks.
Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
Filesystem22 1K-blocks Used Available Use% Mounted on
/dev/mapper/vg00-lscratch 7288301568 6079377352 1208924216 84% /scratch

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingSource of the question:
https://stackoverflow.com/questions/79036667

Question and source license information:
https://meta.stackexchange.com/help/licensing
https://stackoverflow.com/

Видео Perl: inline variable substitution not working канала Emrah KAYA
Страницу в закладки Мои закладки
Все заметки Новая заметка Страницу в заметки

На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.

Об использовании CookiesПринять