This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use feature 'switch'; | |
our $minus = 0; #флаг, который устанавливается при обнаружении унарного минуса | |
while (<>) { | |
my @F, $F, @RPN, @stack; | |
chomp; | |
@F = m/[()^*\/+-]|\d*\.?\d+(?:[eE][+-]?\d*)?/g; | |
#преобразуем в обратную польскую нотацию применяя метод сортировочной станции | |
for my $i (0 .. $#F) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dir /A-D | perl -lnaF"\s+" -e "BEGIN {$n = 0; $m = 0} $F[2] =~ s/\D//g; $n++; if ($F[2] > 1048576) {$m++; print $F[3]} END {print qq{\nFiles total: }.($n - 7).qq{\nNumber of files greater than 1Mb: $m}}"\ | |
#!!!-----dir output (/A-D disable directories)-----!!! | |
C:\Users\Dima\Downloads>dir /A-D | |
Том в устройстве C не имеет метки. | |
Серийный номер тома: 6C3F-B12A |