# Polish translation of manpages # This file is distributed under the same license as the manpages-l10n package. # Copyright © of this file: # Przemek Borys , 1999. # Wojtek Kotwica , 1999-2000. msgid "" msgstr "" "Project-Id-Version: manpages-l10n\n" "POT-Creation-Date: 2025-02-16 05:40+0100\n" "PO-Revision-Date: 2000-10-22 16:15+0200\n" "Last-Translator: Wojtek Kotwica \n" "Language-Team: Polish \n" "Language: pl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2);\n" #. type: TH #: perlop.1:128 #, no-wrap msgid "PERLOP" msgstr "PERLOP" #. type: TH #: perlop.1:128 #, no-wrap msgid "perl 5.004, patch 01" msgstr "perl 5.004, patch 01" #. type: TH #: perlop.1:128 #, no-wrap msgid "7/Jun/97" msgstr "7/06/97" #. type: TH #: perlop.1:128 #, no-wrap msgid "Perl Programmer's Guide" msgstr "Podręcznik programisty perla" #. type: IX #: perlop.1:129 #, no-wrap msgid "Title" msgstr "Title" #. type: IX #: perlop.1:129 #, no-wrap msgid "PERLOP 1" msgstr "PERLOP 1" #. type: IX #: perlop.1:131 #, no-wrap msgid "Name" msgstr "Name" #. type: ds C+ #: perlop.1:134 #, no-wrap msgid "C\\v'-.1v'\\h'-1p'\\s-2+\\h'-1p'+\\s0\\v'.1v'\\h'-1p'" msgstr "C\\v'-.1v'\\h'-1p'\\s-2+\\h'-1p'+\\s0\\v'.1v'\\h'-1p'" #. type: ds : #: perlop.1:186 #, no-wrap msgid "\\k:\\h'-(\\n(.wu*8/10-\\*(#H+.1m+\\*(#F)'\\v'-\\*(#V'\\z.\\h'.2m+\\*(#F'.\\h'|\\n:u'\\v'\\*(#V'" msgstr "\\k:\\h'-(\\n(.wu*8/10-\\*(#H+.1m+\\*(#F)'\\v'-\\*(#V'\\z.\\h'.2m+\\*(#F'.\\h'|\\n:u'\\v'\\*(#V'" #. type: ds 8 #: perlop.1:187 #, no-wrap msgid "\\h'\\*(#H'\\(*b\\h'-\\*(#H'" msgstr "\\h'\\*(#H'\\(*b\\h'-\\*(#H'" #. type: ds v #: perlop.1:188 #, no-wrap msgid "\\k:\\h'-(\\n(.wu*9/10-\\*(#H)'\\v'-\\*(#V'\\*(#[\\s-4v\\s0\\v'\\*(#V'\\h'|\\n:u'\\*(#]" msgstr "\\k:\\h'-(\\n(.wu*9/10-\\*(#H)'\\v'-\\*(#V'\\*(#[\\s-4v\\s0\\v'\\*(#V'\\h'|\\n:u'\\*(#]" #. type: ds _ #: perlop.1:189 #, no-wrap msgid "\\k:\\h'-(\\n(.wu*9/10-\\*(#H+(\\*(#F*2/3))'\\v'-.4m'\\z\\(hy\\v'.4m'\\h'|\\n:u'" msgstr "\\k:\\h'-(\\n(.wu*9/10-\\*(#H+(\\*(#F*2/3))'\\v'-.4m'\\z\\(hy\\v'.4m'\\h'|\\n:u'" #. type: ds . #: perlop.1:190 #, no-wrap msgid "\\k:\\h'-(\\n(.wu*8/10)'\\v'\\*(#V*4/10'\\z.\\v'-\\*(#V*4/10'\\h'|\\n:u'" msgstr "\\k:\\h'-(\\n(.wu*8/10)'\\v'\\*(#V*4/10'\\z.\\v'-\\*(#V*4/10'\\h'|\\n:u'" #. type: ds 3 #: perlop.1:191 #, no-wrap msgid "\\*(#[\\v'.2m'\\s-2\\&3\\s0\\v'-.2m'\\*(#]" msgstr "\\*(#[\\v'.2m'\\s-2\\&3\\s0\\v'-.2m'\\*(#]" #. type: ds o #: perlop.1:192 #, no-wrap msgid "\\k:\\h'-(\\n(.wu+\\w'\\(de'u-\\*(#H)/2u'\\v'-.3n'\\*(#[\\z\\(de\\v'.3n'\\h'|\\n:u'\\*(#]" msgstr "\\k:\\h'-(\\n(.wu+\\w'\\(de'u-\\*(#H)/2u'\\v'-.3n'\\*(#[\\z\\(de\\v'.3n'\\h'|\\n:u'\\*(#]" #. type: ds d- #: perlop.1:193 #, no-wrap msgid "\\h'\\*(#H'\\(pd\\h'-\\w'~'u'\\v'-.25m'I<\\(hy>\\v'.25m'\\h'-\\*(#H'" msgstr "\\h'\\*(#H'\\(pd\\h'-\\w'~'u'\\v'-.25m'I<\\(hy>\\v'.25m'\\h'-\\*(#H'" #. type: ds D- #: perlop.1:194 #, no-wrap msgid "D\\k:\\h'-\\w'D'u'\\v'-.11m'\\z\\(hy\\v'.11m'\\h'|\\n:u'" msgstr "D\\k:\\h'-\\w'D'u'\\v'-.11m'\\z\\(hy\\v'.11m'\\h'|\\n:u'" #. type: ds th #: perlop.1:195 #, no-wrap msgid "\\*(#[\\v'.3m'\\s+1I\\s-1\\v'-.3m'\\h'-(\\w'I'u*2/3)'\\s-1o\\s+1\\*(#]" msgstr "\\*(#[\\v'.3m'\\s+1I\\s-1\\v'-.3m'\\h'-(\\w'I'u*2/3)'\\s-1o\\s+1\\*(#]" #. type: ds Th #: perlop.1:196 #, no-wrap msgid "\\*(#[\\s+2I\\s-2\\h'-\\w'I'u*3/5'\\v'-.3m'o\\v'.3m'\\*(#]" msgstr "\\*(#[\\s+2I\\s-2\\h'-\\w'I'u*3/5'\\v'-.3m'o\\v'.3m'\\*(#]" #. type: ds ae #: perlop.1:197 #, no-wrap msgid "a\\h'-(\\w'a'u*4/10)'e" msgstr "a\\h'-(\\w'a'u*4/10)'e" #. type: ds Ae #: perlop.1:198 #, no-wrap msgid "A\\h'-(\\w'A'u*4/10)'E" msgstr "A\\h'-(\\w'A'u*4/10)'E" #. type: ds oe #: perlop.1:199 #, no-wrap msgid "o\\h'-(\\w'o'u*4/10)'e" msgstr "o\\h'-(\\w'o'u*4/10)'e" #. type: ds Oe #: perlop.1:200 #, no-wrap msgid "O\\h'-(\\w'O'u*4/10)'E" msgstr "O\\h'-(\\w'O'u*4/10)'E" #. type: IX #: perlop.1:225 perlop.1:228 perlop.1:264 #, no-wrap msgid "Header" msgstr "Header" #. type: IX #: perlop.1:225 #, no-wrap msgid "NAME" msgstr "NAZWA" #. type: Plain text #: perlop.1:227 msgid "perlop - Perl operators and precedence" msgstr "perlop - operatory perla i priorytety" #. type: IX #: perlop.1:228 #, no-wrap msgid "SYNOPSIS" msgstr "STRESZCZENIE" #. type: Plain text #: perlop.1:234 msgid "" "Perl operators have the following associations and precedences, listed from " "highest to lowest. Note that all operators borrowed from C preserve their " "associations, although the conventions are a bit screwed up. (This makes it " "easier for C programmers to learn Perl.) With a few exceptions, they all " "operate on scalar values, not arrays." msgstr "" "Operatory perla mają następujące związki i priorytety, wymienione od " "najwyższych do najniższych. Zauważ, że wszystkie operatory pożyczone z C " "zachowują tamtejsze związki, choć te konwencje są trochę skopane. (Ułatwia " "to naukę perla programistom C.) Poza paroma wyjątkami, wszystkie one operują " "na wartościach skalarnych, nie tablicowych." #. type: Plain text #: perlop.1:260 msgid "" "\\& left expressions and left-side list operators \\& left -E \\& unbound " "++ -- \\& right ** \\& right ! ~ \\e and unary + and - \\& left =~ !~ \\& " "left * / % x \\& left + - . \\& left EE EE \\& unbound named " "unary operators \\& unbound E E E= E= lt gt le ge \\& unbound " "== != E=E eq ne cmp \\& left & \\& left | ^ \\& left && \\& left || " "\\& unbound .. ... \\& right ?: \\& right = += -= *= etc. \\& left , =E " "\\& unbound right list operators \\& right not \\& left and \\& left or xor" msgstr "" "\\& lewe wyrażenia i lewostronne operatory list \\& lewe -E \\& " "niezwiązane ++ -- \\& prawe ** \\& prawe ! ~ \\e and jednoargumentowy + and - " "\\& lewe =~ !~ \\& lewe * / % x \\& lewe + - . \\& lewe EE " "EE \\& niezwiązane nazwane operatory jednoargumentowe \\& niezwiązane " "E E E= E= lt gt le ge \\& niezwiązane == != E=E eq ne " "cmp \\& lewe & \\& lewe | ^ \\& lewe && \\& lewe || \\& niezwiązane .. ... " "\\& prawe ?: \\& prawe = += -= *= etc. \\& lewe , =E \\& niezwiązane " "prawostronne operatory list \\& prawe not \\& lewe and \\& lewe or xor" #. type: Plain text #: perlop.1:263 msgid "" "In the following sections, these operators are described in order of " "precedence." msgstr "" "W następujących sekcjach, operatory te są opisane w kolejności priorytetowej." #. type: IX #: perlop.1:264 #, no-wrap msgid "DESCRIPTION" msgstr "OPIS" #. type: IX #: perlop.1:266 perlop.1:321 perlop.1:335 perlop.1:358 perlop.1:365 perlop.1:393 #: perlop.1:412 perlop.1:441 perlop.1:448 perlop.1:457 perlop.1:489 perlop.1:514 #: perlop.1:537 perlop.1:542 perlop.1:549 perlop.1:555 perlop.1:586 perlop.1:659 #: perlop.1:685 perlop.1:731 perlop.1:744 perlop.1:759 perlop.1:763 perlop.1:768 #: perlop.1:776 perlop.1:789 perlop.1:844 perlop.1:1281 perlop.1:1462 #: perlop.1:1484 perlop.1:1506 #, no-wrap msgid "Subsection" msgstr "Subsection" #. type: IX #: perlop.1:266 #, no-wrap msgid "Terms and List Operators (Leftward)" msgstr "" #. type: Plain text #: perlop.1:274 msgid "" "An expression has the highest precedence in Perl. These are variables, " "quotes, quote-like operators, any expression in parentheses, and any function " "whose arguments are enclosed in parentheses. In fact, there are no real " "functions in Perl in the general sense, only list operators and unary " "operators, which behave like functions because you put parentheses around " "them. These are described in the B(1) manual page." msgstr "" "Wyrażenie ma w perlu najwyższy priorytet. Są to zmienne, cytaty, operatory w " "rodzaju cytatów, dowolne wyrażenie w nawiasach, i dowolna funkcja, której " "argumenty są umieszczone w nawiasach. W rzeczywistości, w perlu nie ma tak " "naprawdę funkcji w ogólnym sensie, są tylko operatory listowe i operatory " "jednoargumentowe, zachowujące się jak funkcje, bo ustawiasz wokół nich " "nawiasy. Są one opisane w podręczniku B(1)." #. type: Plain text #: perlop.1:279 msgid "" "If any list operator (I etc.), or any unary operator (I) " "has a left parenthesis after it, then the operator and arguments in the " "parenthesis are taken with the highest precedence, just like in a normal " "function call." msgstr "" "Jeśli dowolny operator listowy (I itp.), lub dowolny operator " "jednoargumentowy (I) ma za sobą lewy nawias, to operator i argumenty " "z nawiasów są brane w najwyższym priorytecie, tak jak przy normalnym " "wywołaniu funkcji." #. type: Plain text #: perlop.1:285 msgid "" "When parentheses are not specified, the precedence of list operators like " "CW, CW, or CW is either very high or very low, depending " "on whether you look at the left side or the right side of the operator. For " "example, in" msgstr "" "Gdy nawiasy nie są podane, priorytet operatorów listowych w rodzaju " "CW, CW, lub CW jest albo bardzo wysoki, albo bardzo " "niski, zależnie od tego czy patrzysz na lewą stronę, czy na prawą stronę " "operatora. Na przykład w" #. type: Plain text #: perlop.1:289 msgid "\\& @ary = (1, 3, sort 4, 2); \\& print @ary; # print 1324" msgstr "\\& @ary = (1, 3, sort 4, 2); \\& print @ary; # drukuje 1324" #. type: Plain text #: perlop.1:295 msgid "" "commas on the right side of sort are evaluated before sorting, but commas on " "the left are evaluated afterward. In other words, list operators eat up any " "arguments that follow them, and then behave like a simple expression that " "respects the expression before it. Note that you have to be careful with the " "parentheses:" msgstr "" "przecinki po prawej stronie sort-a są analizowane przed sortowaniem, lecz " "przecinki po lewej są analizowane później. Innymi słowy, operatory listowe " "pożerają wszystkie argumenty, które za nimi następują, a potem zachowują się " "jak proste wyrażenie, szanujące wyrażenie poprzedzające. Zauważ, że musisz " "być ostrożny z nawiasami:" #. type: Plain text #: perlop.1:300 msgid "" "\\& # Exit before printing: \\& print($foo, exit); # probably not what you " "want \\& print $foo, exit; # neither" msgstr "" "\\& # Wykonują exit przed drukowaniem: \\& print($foo, exit); # raczej nie " "to, czego chcesz \\& print $foo, exit; # ani to" #. type: Plain text #: perlop.1:306 msgid "" "\\& # These print before executing exit \\& (print $foo), exit; # This is " "what you want \\& print($foo), exit; # this too \\& print ($foo), exit; # " "even this" msgstr "" "\\& # Te drukują przed wykonaniem exit \\& (print $foo), exit; # To jest to " "czego chcesz \\& print($foo), exit; # to też \\& print ($foo), exit; # nawet " "to" #. type: Plain text #: perlop.1:308 msgid "Also note that" msgstr "Zauważ też, że" #. type: Plain text #: perlop.1:311 msgid "\\& print ($foo & 255) + 1, \"\\en\";" msgstr "\\& print ($foo & 255) + 1, \"\\en\";" #. type: Plain text #: perlop.1:314 msgid "" "probably doesn't do what you expect. See the section on named unary operators." msgstr "" "prawdopodobnie nie robi tego, co oczekujesz. Zobacz sekcję o nazwanych " "operatorach jednoargumentowych." #. type: Plain text #: perlop.1:318 msgid "" "Additionally, the constructs CW and CW are also processed as " "expressions, as are calls to subroutines and methods, and the anonymous " "constructors CW<[]> and CW<{}>." msgstr "" "Ponadto, jako wyrażenia przetwarzane są też konstrukcje CW i CW, a także wywołania podprocedur i metod, oraz anonimowe konstruktory CW<[]> " "i CW<{}>." #. type: Plain text #: perlop.1:320 msgid "" "See also the section on quoting operators, and the section on I/O operators." msgstr "" "Zobacz też sekcję o operatorach cytowania, a także sekcję o operatorach I/O." #. type: IX #: perlop.1:321 #, no-wrap msgid "The Arrow Operator" msgstr "" #. type: Plain text #: perlop.1:328 msgid "" "As in C and \\*(C+, \\*(L\"CW<-E>\\*(R\" is the dereferencing operator. " "If the right side is an element of CW<[...]> or CW<{...}>, then the left side " "must be a hard or symbolic reference to an array or associative array (or a " "place that is able to hold a hard reference if it is an lvalue (assignable)). " "See the B(1) page." msgstr "" "Podobnie jak w C i \\*(C+, \\*(L\"CW<-E>\\*(R\" jest operatorem " "dereferencji. Jeśli prawa strona to element CW<[...]> lub CW<{...}>, to lewa " "strona musi być twardą, lub symboliczną referencją do tablicy, lub tablicy " "asocjacyjnej (lub miejsca, które jest w stanie przechowywać twardą " "referencję, jeśli jest to lwartość (przypisywalna)). Zobacz stronę " "B(1)." #. type: Plain text #: perlop.1:334 msgid "" "Otherwise, the right side is a method name, or a simple scalar variable " "containing the method name, and the left side must be either an object (a " "blessed reference) or a class name (i.e. a package name). See the " "B(1) page." msgstr "" "W przeciwnym wypadku, prawa strona jest nazwą metody, lub prostą zmienną " "skalarną, zawierającą nazwę metody, a lewa strona musi być albo obiektem " "(pobłogosławioną przez bless referencją), lub nazwą klasy (tj. nazwą " "pakietu). Zobacz stronę B(1)." #. type: IX #: perlop.1:335 #, no-wrap msgid "Auto-increment and Auto-decrement" msgstr "" #. type: Plain text #: perlop.1:340 msgid "" "\\*(L\"++\\*(R\" and \\*(L\"--\\*(R\" work as in C. That is, if they are " "placed before a variable, they increment or decrement the variable before " "returning a value, and if they are placed after the variable, they increment " "or decrement it after returning a value." msgstr "" "\\*(L\"++\\*(R\" i \\*(L\"--\\*(R\" działają jak w C. To znaczy, jeśli są " "umieszczone przed zmienną, to inkrementują lub dekrementują zmienną przed " "zwróceniem wartości, a jeśli są umieszczone za zmienną, to powodują " "inkrementację lub dekrementację po zwróceniu wartości." #. type: Plain text #: perlop.1:349 msgid "" "The auto-increment operator has a few extra things built in. If you're " "incrementing a variable that's numeric, or that's ever been used in a numeric " "context, you'll get normal incrementing. However, if the variable has only " "been used in string contexts, and its value is not null and matches the " "pattern CW, then you'll increment as if it were a " "string, preserving every character in the range, with carry:" msgstr "" "Operator auto-inkrementacji ma wbudowanych parę dodatkowych rzeczy. Jeśli " "inkrementujesz zmienną, która jest numeryczna, lub która była kiedykolwiek " "użyta w kontekście numerycznym, to uzyskasz normalną inkrementację. Jednak " "jeśli zmienna była używana tylko w kontekstach łańcuchowych, a jej wartość " "nie jest nullem i odpowiada wzorcowi CW, to " "inkrementacja jest dokonywana jak na łańcuchu, zachowując każdy znak w " "zakresie, z przeniesieniem:" #. type: Plain text #: perlop.1:355 msgid "" "\\& print ++($foo = '99'); # prints '100' \\& print ++($foo = 'a0'); # prints " "'a1' \\& print ++($foo = 'Az'); # prints 'Ba' \\& print ++($foo = 'zz'); # " "prints 'aaa'" msgstr "" "\\& print ++($foo = '99'); # drukuje '100' \\& print ++($foo = 'a0'); # " "drukuje 'a1' \\& print ++($foo = 'Az'); # drukuje 'Ba' \\& print ++($foo = " "'zz'); # drukuje 'aaa'" #. type: Plain text #: perlop.1:357 msgid "The autodecrement operator does not have these properties." msgstr "Operator autodekrementacji nie ma tych właściwości." #. type: IX #: perlop.1:358 #, no-wrap msgid "Exponentiation" msgstr "" #. type: Plain text #: perlop.1:364 msgid "" "Binary \\*(L\"**\\*(R\" is the exponentiation operator. Note that it is more " "cooperative than unary minus, so -2**4 is -(2**4), not (-2)**4. (This is " "implemented using the C function I\\|(3) , which actually operates on " "double-precision numbers.)" msgstr "" "Binarny \\*(L\"**\\*(R\" jest operatorem potęgowania. Zauważ, że łączy " "mocniej niż jednoargumentowy minus, więc -2**4 to -(2**4), a nie (-2)**4. " "(Jest to zaimplementowane przy użyciu funkcji I\\|(3) z C, która w " "rzeczywistości działa na liczbach typu podwójnej precyzji.)" #. type: IX #: perlop.1:365 #, no-wrap msgid "Symbolic Unary Operators" msgstr "" #. type: Plain text #: perlop.1:369 msgid "" "The unary \\*(L\"!\\*(R\" performs logical negation, i.e. \\*(L\"not\\*(R\". " "See also CW for a lower priority version." msgstr "" "Jednoargumentowy \\*(L\"!\\*(R\" wykonuje negację logiczną, czyli " "\\*(L\"not\\*(R\". Zobacz też CW dla wersji o niższym priorytecie." #. type: Plain text #: perlop.1:377 msgid "" "The unary \\*(L\"-\\*(R\" performs arithmetic negation on a numeric operand. " "If the operand is an identifier, a string consisting of the minus sign and " "the identifier is returned. Otherwise, if the string begins with a plus or " "minus sign, a string with the opposite sign is returned. One effect of this " "is that CW<-bareword> is equivalent to CW<\"-bareword\">." msgstr "" "Jednoargumentowy \\*(L\"-\\*(R\" dokonuje arytmetycznej negacji na " "numerycznym operandzie. Jeśli operand jest identyfikatorem, zwracany jest " "łańcuch składający się ze znaku minus i z identyfikatora. W przeciwnym " "wypadku, jeśli łańcuch rozpoczyna się znakiem plus lub minus, zwracany jest " "łańcuch z przeciwnym znakiem. Jednym z efektów tego działania jest to, że CW<-" "bareword> jest równoważne CW<\"-bareword\">." #. type: Plain text #: perlop.1:380 msgid "" "The unary \\*(L\"~\\*(R\" performs bitwise negation. (See also the section on " "integer arithmetic.)" msgstr "" "Jednoargumentowy \\*(L\"~\\*(R\" dokonuje negacji bitowej. (Zobacz też " "sekcję o arytmetyce całkowitej.)" #. type: Plain text #: perlop.1:386 msgid "" "A single-argument \\*(L\"+\\*(R\" has no effect, even on strings. It is " "useful for separating a function name from a parenthesized expression that " "would otherwise be interpreted as a complete list of function arguments. (See " "examples in the section on expressions and left-hand list operators.)" msgstr "" "Jednoargumentowy \\*(L\"+\\*(R\" nie daje żadnego efektu, nawet na " "łańcuchach. Jest przydatny do rozdzielania nazwy funkcji od otoczonego " "nawiasami wyrażenia, które w przeciwnym wypadku byłoby interpretowane jako " "całkowita lista argumentów funkcji. (Zobacz przykłady w sekcji o wyrażeniach " "i lewostronnych operatorach listowych.)" #. type: Plain text #: perlop.1:392 msgid "" "A unary \\*(L\"\\e\\*(R\" creates a reference to whatever comes after it. See " "the B(1) manual page. Do not confuse this behavior with the behavior " "of backslash in a string, although both forms have the same property of " "protecting the next thing from interpretation." msgstr "" "Jednoargumentowy \\*(L\"\\e\\*(R\" tworzy referencję do tego, co po nim " "następuje. Zobacz podręcznik B(1). Nie myl tego zachowania z " "zachowaniem w łańcuchu odwrotnego ukośnika, choć obie postacie mają tę samą " "właściwość chronienia następnej rzeczy od interpretacji." #. type: IX #: perlop.1:393 #, no-wrap msgid "Binding Operators" msgstr "" #. type: Plain text #: perlop.1:405 msgid "" "Binary \\*(L\"=~\\*(R\" combines a scalar expression with regular expression " "support. Certain operations implicitly search for or change the string " "CW<$_>. This operator causes such an operation to operate on another string. " "The right argument is a search, substitution, or translation pattern. The " "left argument is the string being searched for, instead of the default " "CW<$_>. The return value indicates the success of the operation. (If the " "right argument is an expression rather than a search, substitution, or " "translation pattern, it is interpreted as a run-time search pattern. This may " "be less efficient than an explicit search, since the pattern must be compiled " "each time." msgstr "" "Binarny \\*(L\"=~\\*(R\" łączy wyrażenie skalarne z obsługą wyrażenia " "regularnego. Pewne operacje domyślnie szukają lub zmieniają łańcuch CW<$_>. " "Operator ten powoduje, że taka operacja działa na innym łańcuchu. Prawy " "argument jest wzorcem przeszukiwania, podstawienia lub translacji. Lewy " "argument jest przeszukiwanym łańcuchem, zamiast domyślnego CW<$_>. Wartość " "zwracana określa sukces operacji. (Jeśli prawy argument jest raczej " "wyrażeniem niż wzorcem przeszukiwania, podstawiania lub translacji, to jest " "interpretowany jako wzorzec przeszukiwania czasu działania. Może to być mniej " "efektywne niż jawne szukanie, gdyż wzorzec musi być za każdym razem " "kompilowany." #. type: Plain text #: perlop.1:411 msgid "" "Binary \\*(L\"!~\\*(R\" is similar to \\*(L\"=~\\*(R\" but the return value " "is logically negated." msgstr "" "Binarny \\*(L\"!~\\*(R\" jest podobny do \\*(L\"=~\\*(R\" lecz wartość " "zwracana jest logicznie negowana." #. type: IX #: perlop.1:412 #, no-wrap msgid "Multiplicative Operators" msgstr "" #. type: Plain text #: perlop.1:414 msgid "Binary \\*(L\"*\\*(R\" multiplies two numbers." msgstr "Binarny \\*(L\"*\\*(R\" mnoży dwie liczby." #. type: Plain text #: perlop.1:416 msgid "Binary \\*(L\"/\\*(R\" divides two numbers." msgstr "Binarny \\*(L\"/\\*(R\" dzieli dwie liczby." #. type: Plain text #: perlop.1:424 msgid "" "Binary \\*(L\"%\\*(R\" computes the remainder (modulo) of two numbers. With " "integer operands CW<$a> and CW<$b>: if CW<$b> is positive, then CW<$a % $b> " "is CW<$a> minus the largest multiple of CW<$b> that is not greater than " "CW<$a>. If CW<$b> is negative, then CW<$a % $b> is CW<$a> minus the smallest " "multiple of CW<$b> that is not less than CW<$a> (i.e. the result will be less " "than or equal to zero)." msgstr "" "Binarny \\*(L\"%\\*(R\" oblicza resztę (modulo) z dwóch liczb. Z całkowitymi " "operandami CW<$a> i CW<$b>: jeśli CW<$b> jest dodatnie, to CW<$a % $b> to " "CW<$a> minus największa wielokrotność CW<$b>, która nie jest większa od " "CW<$a>. Jeśli CW<$b> jest ujemne, to CW<$a % $b> to CW<$a> minus najmniejsza " "wielokrotność CW<$b>, która nie jest mniejsza niż CW<$a> (np. wynik będzie " "mniejszy lub równy od zera)." #. type: Plain text #: perlop.1:429 msgid "" "Binary \\*(L\"x\\*(R\" is the repetition operator. In scalar context, it " "returns a string consisting of the left operand repeated a number of times " "specified in the right. In list context, if the left operand is a " "parenthesized list, the list is repeated." msgstr "" "Binarny \\*(L\"x\\*(R\" jest operatorem powtórzenia. W kontekście skalarnym, " "zwraca łańcuch składający się z lewego operanda, powtórzonego tyle razy, ile " "podano w prawym. W kontekście listowym, jeśli lewy operand jest listą w " "nawiasach, powtarzana jest lista." #. type: Plain text #: perlop.1:432 msgid "\\& print '-' x 80; # print a line of dashes" msgstr "\\& print '-' x 80; # wydrukuj wiersz kresek" #. type: Plain text #: perlop.1:435 msgid "\\& print \"\\et\" x ($tab/8), ' ' x ($tab%8); # tabulate through" msgstr "\\& print \"\\et\" x ($tab/8), ' ' x ($tab%8); # tabuluj poprzez" #. type: Plain text #: perlop.1:439 msgid "" "\\& @ones = (1) x 80; # list of 80 ones \\& @ones = (5) x @ones; # set all " "elements to 5" msgstr "" "\\& @ones = (1) x 80; # lista 80 jedynek \\& @ones = (5) x @ones; # ustaw " "wszystkie elementy na 5" #. type: IX #: perlop.1:441 #, no-wrap msgid "Additive Operators" msgstr "" #. type: Plain text #: perlop.1:443 msgid "Binary \\*(L\"+\\*(R\" returns the sum of two numbers." msgstr "Binarny \\*(L\"+\\*(R\" zwraca sumę dwóch liczb." #. type: Plain text #: perlop.1:445 msgid "Binary \\*(L\"-\\*(R\" returns the difference of two numbers." msgstr "Binarny \\*(L\"-\\*(R\" zwraca różnicę dwóch liczb." #. type: Plain text #: perlop.1:447 msgid "Binary \\*(L\".\\*(R\" concatenates strings." msgstr "Binarny \\*(L\".\\*(R\" łączy (konkatenuje) łańcuchy." #. type: IX #: perlop.1:448 #, no-wrap msgid "Shift Operators" msgstr "" #. type: Plain text #: perlop.1:452 msgid "" "Binary \\*(L\"EE\\*(R\" returns the value of its left argument, " "shifted left by the number of bits given by the right argument. The arguments " "should be integers. (See also the section on integer arithmetic.)" msgstr "" "Binarny \\*(L\"EE\\*(R\" zwraca wartość swojego lewego argumentu, " "przesuniętego w lewo o ilość bitów, podaną w prawym argumencie. Argumenty " "powinny być liczbami całkowitymi. (Zobacz też sekcję o arytmetyce całkowitej.)" #. type: Plain text #: perlop.1:456 msgid "" "Binary \\*(L\"EE\\*(R\" returns the value of its left argument " "shifted right by the number of bits given by the right argument. The " "arguments should be integers." msgstr "" "Binarny \\*(L\"EE\\*(R\" zwraca wartość swojego lewego argumentu, " "przesuniętego w prawo o ilość bitów, podaną w prawym argumencie. Argumenty " "powinny być liczbami całkowitymi." #. type: IX #: perlop.1:457 #, no-wrap msgid "Named Unary Operators" msgstr "" #. type: Plain text #: perlop.1:461 msgid "" "The various named unary operators are treated as unary functions, with " "optional parentheses. These include file tests, etc. See the manual page for " "B(1)." msgstr "" "Różne nazwane operatory jednoargumentowe są traktowane jak jednoargumentowe " "funkcje, z opcjonalnymi nawiasami. Są to m.in testy plikowe, itp. Zobacz " "podręcznik B(1)." #. type: Plain text #: perlop.1:466 msgid "" "If any list operator (I etc.) or unary operator (I etc.) is " "followed by a left parenthesis, then the operator and arguments in the " "parenthesis are taken with the highest precedence, just as in a function " "call. Examples:" msgstr "" "Jeśli za dowolnym operatorem listowym (I itp.), lub operatorem " "jednoargumentowym (I itp.) następuje lewy nawias, to operator i " "argumenty w nawiasach są brane z najwyższym priorytetem, tak jak przy " "wywołaniu funkcji. Przykłady:" #. type: Plain text #: perlop.1:472 msgid "" "\\& chdir $foo || die; # (chdir $foo) || die \\& chdir($foo) || die; # " "(chdir $foo) || die \\& chdir ($foo) || die; # (chdir $foo) || die \\& chdir " "+($foo) || die; # (chdir $foo) || die" msgstr "" "\\& chdir $foo || die; # (chdir $foo) || die \\& chdir($foo) || die; # " "(chdir $foo) || die \\& chdir ($foo) || die; # (chdir $foo) || die \\& chdir " "+($foo) || die; # (chdir $foo) || die" #. type: Plain text #: perlop.1:474 msgid "but since * has higher precedence than ||:" msgstr "lecz ponieważ * ma wyższy priorytet niż ||:" #. type: Plain text #: perlop.1:480 msgid "" "\\& chdir $foo * 20; # chdir ($foo * 20) \\& chdir($foo) * 20; # (chdir " "$foo) * 20 \\& chdir ($foo) * 20; # (chdir $foo) * 20 \\& chdir +($foo) * 20; " "# chdir ($foo * 20)" msgstr "" "\\& chdir $foo * 20; # chdir ($foo * 20) \\& chdir($foo) * 20; # (chdir " "$foo) * 20 \\& chdir ($foo) * 20; # (chdir $foo) * 20 \\& chdir +($foo) * 20; " "# chdir ($foo * 20)" #. type: Plain text #: perlop.1:486 msgid "" "\\& rand 10 * 20; # rand (10 * 20) \\& rand(10) * 20; # (rand 10) * 20 \\& " "rand (10) * 20; # (rand 10) * 20 \\& rand +(10) * 20; # rand (10 * 20)" msgstr "" "\\& rand 10 * 20; # rand (10 * 20) \\& rand(10) * 20; # (rand 10) * 20 \\& " "rand (10) * 20; # (rand 10) * 20 \\& rand +(10) * 20; # rand (10 * 20)" #. type: Plain text #: perlop.1:488 msgid "See also the section on expressions and left-hand list operators." msgstr "Zobacz też sekcję o wyrażeniach i lewostronnych operatorach listowych." #. type: IX #: perlop.1:489 #, no-wrap msgid "Relational Operators" msgstr "" #. type: Plain text #: perlop.1:492 msgid "" "Binary \\*(L\"E\\*(R\" returns true if the left argument is numerically " "less than the right argument." msgstr "" "Binarny \\*(L\"E\\*(R\" zwraca prawdę, jeśli lewy argument jest " "numerycznie mniejszy niż prawy." #. type: Plain text #: perlop.1:495 msgid "" "Binary \\*(L\"E\\*(R\" returns true if the left argument is numerically " "greater than the right argument." msgstr "" "Binarny \\*(L\"E\\*(R\" zwraca prawdę, jeśli lewy argument jest " "numerycznie większy niż prawy." #. type: Plain text #: perlop.1:498 msgid "" "Binary \\*(L\"E=\\*(R\" returns true if the left argument is numerically " "less than or equal to the right argument." msgstr "" "Binarny \\*(L\"E=\\*(R\" zwraca prawdę, jeśli lewy argument jest " "numerycznie mniejszy lub równy prawemu." #. type: Plain text #: perlop.1:501 msgid "" "Binary \\*(L\"E=\\*(R\" returns true if the left argument is numerically " "greater than or equal to the right argument." msgstr "" "Binarny \\*(L\"E=\\*(R\" zwraca prawdę, jeśli lewy argument jest " "numerycznie większy lub równy prawemu." #. type: Plain text #: perlop.1:504 msgid "" "Binary \\*(L\"lt\\*(R\" returns true if the left argument is stringwise less " "than the right argument." msgstr "" "Binarny \\*(L\"lt\\*(R\" zwraca prawdę, jeśli lewy argument jest łańcuchowo " "mniejszy od prawego." #. type: Plain text #: perlop.1:507 msgid "" "Binary \\*(L\"gt\\*(R\" returns true if the left argument is stringwise " "greater than the right argument." msgstr "" "Binarny \\*(L\"gt\\*(R\" zwraca prawdę, jeśli lewy argument jest łańcuchowo " "większy od prawego." #. type: Plain text #: perlop.1:510 msgid "" "Binary \\*(L\"le\\*(R\" returns true if the left argument is stringwise less " "than or equal to the right argument." msgstr "" "Binarny \\*(L\"le\\*(R\" zwraca prawdę, jeśli lewy argument jest łańcuchowo " "mniejszy lub równy prawemu." #. type: Plain text #: perlop.1:513 msgid "" "Binary \\*(L\"ge\\*(R\" returns true if the left argument is stringwise " "greater than or equal to the right argument." msgstr "" "Binarny \\*(L\"ge\\*(R\" zwraca prawdę, jeśli lewy argument jest łańcuchowo " "większy lub równy prawemu." #. type: IX #: perlop.1:514 #, no-wrap msgid "Equality Operators" msgstr "" #. type: Plain text #: perlop.1:517 msgid "" "Binary \\*(L\"==\\*(R\" returns true if the left argument is numerically " "equal to the right argument." msgstr "" "Binarny \\*(L\"==\\*(R\" zwraca prawdę, jeśli lewy argument jest numerycznie " "równy prawemu." #. type: Plain text #: perlop.1:520 msgid "" "Binary \\*(L\"!=\\*(R\" returns true if the left argument is not numerically " "equal to the right argument." msgstr "" "Binarny \\*(L\"!=\\*(R\" zwraca prawdę, jeśli lewy argument nie jest " "numerycznie równy prawemu." #. type: Plain text #: perlop.1:523 msgid "" "Binary \\*(L\"E=E\\*(R\" returns -1, 0, or 1, depending on whether " "the left argument is numerically less than, equal to, or greater than the " "right argument." msgstr "" "Binarny \\*(L\"E=E\\*(R\" zwraca -1, 0, lub 1, zależnie od tego czy " "lewy argument jest numerycznie mniejszy, równy, lub większy od prawego." #. type: Plain text #: perlop.1:526 msgid "" "Binary \\*(L\"eq\\*(R\" returns true if the left argument is stringwise equal " "to the right argument." msgstr "" "Binarny \\*(L\"eq\\*(R\" zwraca prawdę, jeśli lewy argument jest łańcuchowo " "równy prawemu." #. type: Plain text #: perlop.1:529 msgid "" "Binary \\*(L\"ne\\*(R\" returns true if the left argument is not stringwise " "equal to the right argument." msgstr "" "Binarny \\*(L\"ne\\*(R\" zwraca prawdę, jeśli lewy argument nie jest " "łańcuchowo równy prawemu." #. type: Plain text #: perlop.1:532 msgid "" "Binary \\*(L\"cmp\\*(R\" returns -1, 0, or 1, depending on whether the left " "argument is stringwise less than, equal to, or greater than the right " "argument." msgstr "" "Binarny \\*(L\"cmp\\*(R\" zwraca -1, 0, lub 1, zależnie od tego, czy lewy " "argument jest łańcuchowo mniejszy, równy, lub większy od prawego." #. type: Plain text #: perlop.1:536 msgid "" "\\*(L\"lt\\*(R\", \\*(L\"le\\*(R\", \\*(L\"ge\\*(R\", \\*(L\"gt\\*(R\" i " "\\*(L\"cmp\\*(R\" may use the sort order specified by the current locale " "(when CW is used). See the B(1) manual page." msgstr "" "\\*(L\"lt\\*(R\", \\*(L\"le\\*(R\", \\*(L\"ge\\*(R\", \\*(L\"gt\\*(R\" i " "\\*(L\"cmp\\*(R\" mogą używać kolejności sortowania, określonej przez bieżące " "locale (gdy użyte jest CW). Zobacz podręcznik B(1)." #. type: IX #: perlop.1:537 #, no-wrap msgid "Bitwise And" msgstr "" #. type: Plain text #: perlop.1:541 msgid "" "Binary \\*(L\"&\\*(R\" returns its operators, combined bitwise by the logical " "AND operation. (See also the section on integer arithmetic.)" msgstr "" "Binarny \\*(L\"&\\*(R\" zwraca jego operatory, połączone bitowo operacją " "logiczną AND. (Zobacz też sekcję o arytmetyce całkowitej.)" #. type: IX #: perlop.1:542 #, no-wrap msgid "Bitwise Or and Exclusive Or" msgstr "" #. type: Plain text #: perlop.1:545 msgid "" "Binary \\*(L\"|\\*(R\" returns its operators, combined bitwise by the logical " "OR operation. (See also the section on integer arithmetic.)" msgstr "" "Binarny \\*(L\"|\\*(R\" zwraca swoje operatory, połączone bitowo operacją " "logiczną OR. (Zobacz też sekcję o arytmetyce całkowitej)." #. type: Plain text #: perlop.1:548 msgid "" "Binary \\*(L\"^\\*(R\" returns its operators, combined bitwise by XOR. (See " "also the section on integer arithmetic.)" msgstr "" "Binarny \\*(L\"^\\*(R\" zwraca swoje operatory, połączone bitowo operacją " "XOR. (Zobacz też sekcję o arytmetyce całkowitej.)" #. type: IX #: perlop.1:549 #, no-wrap msgid "C-style Logical And" msgstr "" #. type: Plain text #: perlop.1:554 msgid "" "Binary \\*(L\"&&\\*(R\" performs a logical AND operation. If the left operand " "is false, the right one is not even evaluated. The scalar or list context " "propagates to the right operator if it is evaluated." msgstr "" "Binarny \\*(L\"&&\\*(R\" dokonuje logicznej operacji AND. Jeśli lewy operand " "jest fałszywy (false), to prawy nie jest nawet analizowany. Kontekst " "skalarny, lub listowy propaguje do prawego operatora, jeśli jest on " "analizowany." #. type: IX #: perlop.1:555 #, no-wrap msgid "C-style Logical Or" msgstr "" #. type: Plain text #: perlop.1:560 msgid "" "Binary \\*(L\"||\\*(R\" performs a logical OR operation. That is, if the left " "operand is true, the right one is not even evaluated. The scalar or list " "context propagates to the right operator if it is evaluated." msgstr "" "Binarny \\*(L\"||\\*(R\" dokonuje logicznej operacji OR. To znaczy, że jeśli " "lewy operand jest prawdziwy (true), to prawy nie jest nawet analizowany. " "Kontekst skalarny, lub listowy propaguje do prawego operatora, jeśli jest on " "analizowany." #. type: Plain text #: perlop.1:564 msgid "" "The CW<||> and CW<&&> operators differ from C in that they return the last " "value evaluated instead of 0 or 1. So a portable way to find the home " "directory (assuming it is not \\*(L\"0\") would be:" msgstr "" "Operatory CW<||> i CW<&&> różnią się od C tym, że zwracają ostatnią " "analizowaną wartość zamiast 0 czy 1. Tak więc przenośnym sposobem znalezienia " "katalogu domowego (zakładając, że nie jest \\*(L\"0\"), może być:" #. type: Plain text #: perlop.1:568 msgid "" "\\& $home = $ENV{'HOME'} || $ENV{'LOGDIR'} || \\& (getpwuid($E))[7] || " "die \"You're homeless!\\en\";" msgstr "" "\\& $home = $ENV{'HOME'} || $ENV{'LOGDIR'} || \\& (getpwuid($E))[7] || " "die \"You're homeless!\\en\";" #. type: Plain text #: perlop.1:574 msgid "" "As more readable alternatives to CW<&&> and CW<||>, Perl provides the " "operators \\*(L\"and\\*(R\" and \\*(L\"or\\*(R\" (see below). The behavior is " "identical. However, their precedence is lower, so you can safely use them " "after the list operator, without having to use parentheses:" msgstr "" "Jako czytelniejsze alternatywy CW<&&> i CW<||>, perl udostępnia operatory " "\\*(L\"and\\*(R\" i \\*(L\"or\\*(R\" (patrz niżej). Zachowanie jest " "identyczne. Jednak ich priorytet jest niższy, więc możesz ich bezpiecznie " "używać po operatorze listowym, bez konieczności używania nawiasów:" #. type: Plain text #: perlop.1:578 msgid "\\& unlink \"alpha\", \"beta\", \"gamma\" \\& or gripe(), next LINE;" msgstr "\\& unlink \"alpha\", \"beta\", \"gamma\" \\& or gripe(), next LINE;" #. type: Plain text #: perlop.1:580 msgid "Using C-style operators, this would have to be written as:" msgstr "Z użyciem operatorów w stylu C, trzeba by było to zapisać jako:" #. type: Plain text #: perlop.1:584 msgid "\\& unlink(\"alpha\", \"beta\", \"gamma\") \\& || (gripe(), next LINE);" msgstr "" "\\& unlink(\"alpha\", \"beta\", \"gamma\") \\& || (gripe(), next LINE);" #. type: IX #: perlop.1:586 #, no-wrap msgid "Range Operator" msgstr "" #. type: Plain text #: perlop.1:594 msgid "" "Binary \\*(L\"..\\*(R\" is the range operator, which is really two other " "operators, depending on the context. In list context, it returns an array of " "values, counted (one by one) from left to right. This is useful for writing " "CW loops and doing slice operations on arrays. Be aware that in " "the current implementation a temporary array is created, so some memory is " "needed for this if you write something like this:" msgstr "" "Binarny \\*(L\"..\\*(R\" jest operatorem zakresu, który jest w rzeczywistości " "dwoma innymi operatorami, zależnymi od kontekstu. W kontekście listowym, " "zwraca tablicę wartości, liczoną (po jednym) od wartości lewej do prawej. " "Jest to przydatne do zapisywania pętli CW i robienia operacji " "wycinania (slice) na tablicach. Bądź świadom, że w bieżącej implementacji " "tworzona jest tymczasowa tablica, więc potrzeba na to trochę pamięci, jeśli " "zapiszesz coś takiego:" #. type: Plain text #: perlop.1:599 msgid "\\& for (1 .. 1_000_000) { \\& # code \\& }" msgstr "\\& for (1 .. 1_000_000) { \\& # kod \\& }" #. type: Plain text #: perlop.1:624 msgid "" "In scalar context, \\*(L\"..\\*(R\" returns a logical value. The operator is " "two-state, like a flip-flop, and emulates the linear (comma) range operator " "from B(1), B(1), and various editors. Each \\*(L\"..\\*(R\" " "operator handles its own logical state. It is false as long as the left " "operand is false. Once the left operand becomes true, the range operator " "remains true as long as the right operand becomes true, AFTER which, the " "range operator evaluates to false. (It does not become false until the next " "time it is evaluated. It may test the right operand and become false in the " "same evaluation when it becomes true (as in B(1)), but it will still " "return true once. If you do not want it to test the right operand before the " "next evaluation (as in B(1)), use three dots (\\*(R\"...\") instead of " "two.) The right operand is not evaluated while the operator is false, and the " "left operand is not evaluated while the operator is true. The priority is " "slightly lower than || and &&. The return value is either a null string for " "false, or a sequence number (starting at 1) for true. The sequence number is " "reset for each range encountered. The final sequence number in the range has " "the string \\*(L\"E0\\*R\" appended to it, which has no effect on the numeric " "value, but gives you something to look forward to at the end. You can " "suppress the starting point by waiting until the sequence number becomes " "greater than one. If either operand of the scalar \\*(L\"..\\*(R\" is a " "numeric literal, the operand is implicitly compared to the variable CW<$.>, " "the current line number. Examples:" msgstr "" "W kontekście skalarnym, \\*(L\"..\\*(R\" zwraca wartość logiczną. Operator " "jest dwustanowy, jak flip-flop i emuluje operator zakresu liniowego " "(przecinek) z B(1), B(1) i różnych edytorów. Każdy operator " "\\*(L\"..\\*(R\" obsługuje swój własny stan logiczny. Jest on fałszywy tak " "długo, jak długo lewy operand jest fałszywy. Gdy lewy operand stanie się " "prawdziwy, operator zakresu pozostaje prawdziwy dopóki prawy argument jest " "prawdą, PO czym, operator zakresu przyjmuje wartość fałszu. (Nie staje się " "fałszywym do czasu następnej jego analizy. Może testować prawy operand i stać " "się fałszywym w tej samej analizie, kiedy stał się prawdziwym (jak w " "B(1)), lecz wciąż będzie raz zwracał prawdę. Jeśli nie chcesz by " "testował prawy operand przed następną analizą (jak w B(1)), użyj trzech " "kropek (\\*(R\"...\") zamiast dwóch.) Prawy operand nie jest analizowany " "podczas gdy operator jest w stanie fałszu, a lewy operand nie jest " "analizowany gdy operator jest w stanie prawdy. Priorytet jest trochę niższy " "niż || i &&. Zwracana wartość jest albo łańcuchem null dla fałszu, lub liczbą " "sekwencyjną (zaczynającą się od 1) dla prawdy. Liczba sekwencyjna jest " "resetowana dla każdego napotkanego zakresu. Końcowa liczba sekwencyjna w " "zakresie ma doklejony łańcuch \\*(L\"E0\\*R\", który nie ma jednak wpływu na " "wartość numeryczną, a za to daje coś, czego możesz oczekiwać na końcu. Możesz " "wyłączyć punkt początkowy przez oczekiwanie aż liczba sekwencyjna stanie się " "większa niż jeden. Jeśli któryś z operandów skalarnego \\*(L\"..\\*(R\" jest " "literałem numerycznym, operand jest niejawnie porównywany ze zmienną CW<$.>, " "bieżącym numerem linii. Przykłady:" #. type: Plain text #: perlop.1:626 msgid "As a scalar operator:" msgstr "Jako operator skalarny:" #. type: Plain text #: perlop.1:631 msgid "" "\\& if (101 .. 200) { print; } # print second hundred lines \\& next line if " "(1 .. /^$/); # skip [mail] header lines \\& s/^/E / if (/^$/ .. eof()); # " "Quote body" msgstr "" "\\& if (101 .. 200) { print; } # wydrukuj drugą setkę linii \\& next line if " "(1 .. /^$/); # pomiń linie nagłówka [pocztowego] \\& s/^/E / if (/^$/ .. " "eof()); # Cytuj ciało" #. type: Plain text #: perlop.1:633 msgid "As a list operator:" msgstr "Jako operator listowy:" #. type: Plain text #: perlop.1:638 msgid "" "\\& for (101 .. 200) { print; } # print 100 times $_ 100 \\& @foo = @foo[0 .. " "$#foo]; # expensive no-op \\& @foo = @foo[$#foo-4 .. $#foo]; # cut out the " "last 5 pieces" msgstr "" "\\& for (101 .. 200) { print; } # drukuj 100 razy $_ 100 \\& @foo = @foo[0 .. " "$#foo]; # kosztowny no-op \\& @foo = @foo[$#foo-4 .. $#foo]; # wytnij " "ostatnich 5 elementów" #. type: Plain text #: perlop.1:641 msgid "" "The range operator (in list context) uses the magic auto-increment algorithm " "when the operands are strings. You can say" msgstr "" "Operator zakresu (w kontekście listowym) używa w wypadku gdy operandy są " "łańcuchami magicznego algorytmu autoinkrementacji. Możesz powiedzieć" #. type: Plain text #: perlop.1:644 msgid "\\& @alphabet = ('A' .. 'Z');" msgstr "\\& @alphabet = ('A' .. 'Z');" #. type: Plain text #: perlop.1:646 msgid "and get all the letters of the alphabet, or" msgstr "i uzyskać tak wszystkie litery alfabetu, lub" #. type: Plain text #: perlop.1:649 msgid "\\& $hexdigit = (0 .. 9, 'a' .. 'f')[$num & 15];" msgstr "\\& $hexdigit = (0 .. 9, 'a' .. 'f')[$num & 15];" #. type: Plain text #: perlop.1:651 msgid "to get hexadecimal numbers, or" msgstr "by uzyskać liczby szesnastkowe, lub" #. type: Plain text #: perlop.1:654 msgid "\\& @z2 = ('01' .. '31'); print $z2[$mday];" msgstr "\\& @z2 = ('01' .. '31'); print $z2[$mday];" #. type: Plain text #: perlop.1:658 msgid "" "to get dates with leading zeros. If the last value given is not in the " "sequence that magical increment gives, then the sequence continues until the " "next value is no longer than the last value given." msgstr "" "by uzyskać daty z początkowymi zerami. Jeśli ostatnia podana wartość nie jest " "w sekwencji, którą daje magiczna inkrementacja, to sekwencja idzie tak " "daleko, aż następna wartość nie będzie dłuższa niż podana ostatnia wartość." #. type: IX #: perlop.1:659 #, no-wrap msgid "Conditional Operator" msgstr "" #. type: Plain text #: perlop.1:664 msgid "" "\\*(L\"?:\\*(R\" is a conditional operator, just like in C. It works " "similarly to an if-then-else construct. If the argument before ? is true, the " "argument before : is returned. Otherwise, the argument after : is returned. " "For example:" msgstr "" "\\*(L\"?:\\*(R\" jest operatorem warunkowym, zupełnie jak w C. Działa " "podobnie do konstrukcji if-then-else. Jeśli argument przed ? jest prawdziwy, " "to zwracany jest argument przed :. W przeciwnym wypadku, zwracany jest " "argument po :. Na przykład:" #. type: Plain text #: perlop.1:668 msgid "\\& printf \"I have %d ps%s.\\en\", $n, \\& ($n == 1) ? \"a\" : \"y\";" msgstr "\\& printf \"Mam %d ps%s.\\en\", $n, \\& ($n == 1) ? \"a\" : \"y\";" #. type: Plain text #: perlop.1:671 msgid "" "Scalar or list context propagates to the 2nd or 3rd argument, depending on " "the choice." msgstr "" "Kontekst skalarny, lub listowy propaguje do 2-giego lub 3-ciego argumentu, " "zależnie od wyboru." #. type: Plain text #: perlop.1:676 msgid "" "\\& $a = $ok ? $b : $c; # take a scalar \\& @a = $ok ? @b : @c; # take the " "board \\& $a = $ok ? @b : @c; # oops, it's just a counter!" msgstr "" "\\& $a = $ok ? $b : $c; # weź skalar \\& @a = $ok ? @b : @c; # weź tablicę " "\\& $a = $ok ? @b : @c; # oops, to tylko licznik!" #. type: Plain text #: perlop.1:679 msgid "" "The operator can be assigned if both the 2nd and 3rd operands are legal " "lvalues ​​(meaning they can be assigned to):" msgstr "" "Operator może być przypisany jeśli obydwa argumenty -- 2-gi i 3-ci są " "legalnymi lwartościami (co znaczy że można do nich przypisać):" #. type: Plain text #: perlop.1:682 msgid "\\& ($a_or_b ? $a : $b) = $c;" msgstr "\\& ($a_or_b ? $a : $b) = $c;" #. type: Plain text #: perlop.1:684 msgid "" "However, this may not necessarily improve the readability of your program." msgstr "Niekoniecznie musi to jednak poprawić czytelność twojego programu." #. type: IX #: perlop.1:685 #, no-wrap msgid "Assignment Operators" msgstr "" #. type: Plain text #: perlop.1:687 msgid "\\*(L\"=\\*(R\" is the usual assignment operator." msgstr "\\*(L\"=\\*(R\" jest zwykłym operatorem przypisania." #. type: Plain text #: perlop.1:689 msgid "The assignment operator works as in C. That is," msgstr "Operator przypisania działa jak w C. Tzn," #. type: Plain text #: perlop.1:692 msgid "\\& $a += 2;" msgstr "\\& $a += 2;" #. type: Plain text #: perlop.1:694 perlop.1:725 msgid "is equivalent to" msgstr "jest równoważne" #. type: Plain text #: perlop.1:697 msgid "\\& $a = $a + 2;" msgstr "\\& $a = $a + 2;" #. type: Plain text #: perlop.1:701 msgid "" "although without duplicating the side effects that dereferencing an lvalue " "can have, as with I. The other assignment operators work similarly. " "The following are recognized:" msgstr "" "choć bez powielania efektów ubocznych, które może pociągać za sobą " "dereferencja lwartości, tak jak dla I. Inne operatory przypisania " "działają podobnie. Rozpoznawane są następujące:" #. type: Plain text #: perlop.1:707 msgid "" "\\& **= += *= &= EE= &&= \\& -= /= |= EE= ||= \\& .= %= ^= " "\\& x=" msgstr "" "\\& **= += *= &= EE= &&= \\& -= /= |= EE= ||= \\& .= %= ^= " "\\& x=" #. type: Plain text #: perlop.1:710 msgid "" "Notice that while they are grouped into families, they have the same " "assignment priority." msgstr "" "Zauważ, że podczas gdy są one zgrupowane w rodziny, mają jednakowy priorytet " "przypisania." #. type: Plain text #: perlop.1:715 msgid "" "Unlike C, the assignment operator gives a valid lvalue. Modifying an " "assignment is equivalent to making the assignment and then changing the " "assigned variable. This is useful for modifying a copy of something, e.g.:" msgstr "" "W przeciwieństwie do C, operator przypisania daje prawidłową lwartość. " "Modyfikowanie przypisania jest równoważne do robienia przypisania, a potem " "zmieniania przypisanej zmiennej. jest to przydatne do modyfikowania kopii " "czegoś, np:" #. type: Plain text #: perlop.1:718 msgid "\\& ($tmp = $global) =~ tr [A-Z] [a-z];" msgstr "\\& ($tmp = $global) =~ tr [A-Z] [a-z];" #. type: Plain text #: perlop.1:720 msgid "Similarly," msgstr "Podobnie," #. type: Plain text #: perlop.1:723 msgid "\\& ($a += 2) *= 3;" msgstr "\\& ($a += 2) *= 3;" #. type: Plain text #: perlop.1:729 msgid "\\& $a += 2; \\& $a *= 3;" msgstr "\\& $a += 2; \\& $a *= 3;" #. type: IX #: perlop.1:731 #, no-wrap msgid "Comma Operator" msgstr "" #. type: Plain text #: perlop.1:736 msgid "" "Binary \\*(L\",\\*(R\" is the comma operator. In a scalar context, it " "evaluates its left argument, throws away its value, and then evaluates its " "right argument, returning its value. This is the same as the C comma operator." msgstr "" "Binarny \\*(L\",\\*(R\" jest operatorem przecinka. W kontekście skalarnym " "analizuje swój lewy argument, wyrzuca jego wartość i następnie analizuje " "prawy argument, zwracając jego wartość. Jest to takie samo, jak operator " "przecinka z C." #. type: Plain text #: perlop.1:739 msgid "" "In a list context, this is simply the list separator and inserts both " "arguments into the list." msgstr "" "W kontekście listowym, jest to po prostu separator listy i wstawia obydwa " "argumenty do listy." #. type: Plain text #: perlop.1:743 msgid "" "The character =E is often synonymous with the comma operator. It is " "useful for documenting arguments that come in pairs. Since version 5.001, it " "also forces each word on the left to be interpreted as a string." msgstr "" "Znak =E jest często synonimem operatora przecinka. Przydatny jest do " "dokumentowania argumentów, które są w parach. Od wersji 5.001 wymusza to też " "interpretację każdego słowa z lewej jako łańcucha." #. type: IX #: perlop.1:744 #, no-wrap msgid "List Operators (Rightward)" msgstr "" #. type: Plain text #: perlop.1:751 msgid "" "On the right hand side of the list operator, there is low precedence, such " "that it controls all elements found there, separated by commas. The only " "operators with lower precedence are the logical operators \\*(L\"and\\*(R\", " "\\*(L\"or\\*(R\", and \\*(L\"not\\*(R\", which can be used to parse calls to " "list operators without the need for additional parentheses:" msgstr "" "Po prawej stronie operatora listowego, jest niski priorytet, taki że " "kontroluje on wszystkie znalezione tam elementy, oddzielone przecinkami. " "Jedyne operatory o niższym priorytecie to operatory logiczne " "\\*(L\"and\\*(R\", \\*(L\"or\\*(R\", i \\*(L\"not\\*(R\", które mogą być " "używane do analizowania wywołań do operatorów listowych, bez potrzeby " "dodatkowych nawiasów:" #. type: Plain text #: perlop.1:755 msgid "\\& open HANDLE, \"filename\" \\& or die \"Can't open: $!\\en\";" msgstr "\\& open HANDLE, \"filename\" \\& or die \"Can't open: $!\\en\";" #. type: Plain text #: perlop.1:758 msgid "" "See also the discussion of list operators in the section on expressions and " "left-hand list operators." msgstr "" "Zobacz też dyskusję operatorów listowych w sekcji o wyrażeniach i operatorach " "listowych lewostronnych." #. type: IX #: perlop.1:759 #, no-wrap msgid "Logical Not" msgstr "Logical Not" #. type: Plain text #: perlop.1:762 msgid "" "The unary \\*(L\"not\\*(R\" returns the logical negation of the right " "argument. It is equivalent to \\*(L\"!\\*(R\", but has lower precedence." msgstr "" "Jednoargumentowy \\*(L\"not\\*(R\" zwraca logiczną negację prawego " "argumentu. Jest równoważny \\*(L\"!\\*(R\", lecz ma niższy priorytet." #. type: IX #: perlop.1:763 #, no-wrap msgid "Logical And" msgstr "" #. type: Plain text #: perlop.1:767 msgid "" "Binary \\*(L\"and\\*(R\" returns the logical conjunction of the surrounding " "expressions. It is equivalent to &&, but has lower precedence. This means " "that the right expression is evaluated only if the left one is true." msgstr "" "Binarny \\*(L\"and\\*(R\" zwraca logiczną koniunkcję otaczających wyrażeń. " "Jest równoważny &&, lecz ma niższy priorytet. Znaczy to, że prawe wyrażenie " "jest analizowane tylko jeśli lewe jest prawdziwe." #. type: IX #: perlop.1:768 #, no-wrap msgid "Logical or and Exclusive Or" msgstr "" #. type: Plain text #: perlop.1:772 msgid "" "Binary \\*(L\"or\\*(R\" returns the logical disjunction of the surrounding " "expressions. It is equivalent to ||, but has lower precedence. That is, the " "right expression is executed only if the left one is false." msgstr "" "Binarny \\*(L\"or\\*(R\" zwraca logiczną dyzjunkcję otaczających wyrażeń. " "Jest równoważny ||, lecz ma niższy priorytet. Znaczy to, że prawe wyrażenie " "jest wykonywane tylko jeśli lewe jest fałszywe." #. type: Plain text #: perlop.1:775 msgid "" "Binary \\*(L\"xor\\*(R\" returns \\s-1XOR\\s0 of the surrounding expressions. " "Of course, it cannot be used with a restriction like or." msgstr "" "Binarny \\*(L\"xor\\*(R\" zwraca \\s-1XOR\\s0 otaczających wyrażeń. Nie może " "być oczywiście używany z zawężeniem, jak or." #. type: IX #: perlop.1:776 #, no-wrap msgid "C Operators Missing From Perl" msgstr "" #. type: Plain text #: perlop.1:778 msgid "Here are the C operators that Perl doesn't have:" msgstr "Oto operatory C, których perl nie posiada:" #. type: IX #: perlop.1:779 perlop.1:782 perlop.1:786 perlop.1:848 perlop.1:857 perlop.1:859 #: perlop.1:1030 perlop.1:1032 perlop.1:1044 perlop.1:1046 perlop.1:1056 #: perlop.1:1058 perlop.1:1070 perlop.1:1087 perlop.1:1197 perlop.1:1199 #, no-wrap msgid "Item" msgstr "Item" #. type: IX #: perlop.1:779 #, no-wrap msgid "unary &" msgstr "" #. type: Plain text #: perlop.1:781 msgid "" "Address operator. (But see the description of the \\*(L\"\\e\\*(R\") " "operator.)" msgstr "Operator adresu. (Lecz zobacz opis operatora \\*(L\"\\e\\*(R\".)" #. type: IX #: perlop.1:782 #, no-wrap msgid "unary *" msgstr "" #. type: Plain text #: perlop.1:785 msgid "" "Address dereferencing operator. (Perl's prefix dereferencing operators are: " "$, @, %, &.)" msgstr "" "Operator dereferencji (wyłuskania) adresu. (Perlowe przedrostkowe operatory " "dereferencji to: $, @, %, &.)" #. type: IX #: perlop.1:786 #, no-wrap msgid "(\\s-1TYPE\\s0)" msgstr "" #. type: Plain text #: perlop.1:788 msgid "Type conversion operator." msgstr "Operator konwersji typów." #. type: IX #: perlop.1:789 #, no-wrap msgid "Quote and Quote-like Operators" msgstr "" #. type: Plain text #: perlop.1:798 msgid "" "While we normally think of quotes as literal values, in Perl they function as " "operators, providing various interpolation and pattern matching features. " "Perl provides traditional quote characters for these behaviors, but also a " "way to select a quote character. In the following array, CW<{}> denotes a " "pair of delimiters that you select. Non-bracket delimiters use the same " "character for start and end, but the 4 types of brackets can nest." msgstr "" "Podczas gdy normalnie myślimy o cytatach jak o literalnych wartościach, w " "perlu mają one funkcję operatorów, dając różne właściwości interpolowania i " "porównywania wzorców. Perl daje dla tych zachowań tradycyjne znaki " "cytowania, lecz również sposób na wybieranie znaku cytowania. W następującej " "tablicy, CW<{}> oznacza parę ograniczników, które wybierzesz. Ograniczniki " "nienawiasowe używają tego samego znaku na początek i koniec, ale 4 rodzaje " "nawiasów mogą się zagnieżdżać." #. type: Plain text #: perlop.1:808 msgid "" "\\& Customary Standard Meaning Interpolates \\& '' q{} Literal no \\& \"\" " "qq{} Literal yes \\& `` qx{} Command yes \\& qw{} Word list no \\& // m{} " "Pattern match yes \\& s{}{} Substitution yes \\& tr{}{} Translation no" msgstr "" "\\& Zwyczajowy Standardowy Znaczenie Interpoluje \\& '' q{} Literał nie \\& " "\"\" qq{} Literał tak \\& `` qx{} Komenda tak \\& qw{} Lista słów nie \\& // " "m{} Porównanie ze wzorcem tak \\& s{}{} Podstawienie tak \\& tr{}{} " "Translacja nie" #. type: Plain text #: perlop.1:811 msgid "" "For constructs that perform interpolation, variables starting with " "\\*(L\"CW<$>\\*(R\" or \\*(L\"CW<@>\\*(R\" are interpolated as the following " "sequences:" msgstr "" "Dla konstrukcji, wykonujących interpolację, zmienne zaczynające się od " "\\*(L\"CW<$>\\*(R\" lub \\*(L\"CW<@>\\*(R\" są interpolowane jako następujące " "sekwencje:" #. type: Plain text #: perlop.1:829 msgid "" "\\& \\et tab (HT, TAB) \\& \\en newline (LF, NL) \\& \\er return (CR) \\& " "\\ef form feed (FF) \\& \\eb backspace (BS) \\& \\ea alarm (bell) (BEL) \\& " "\\ee escape (ESC) \\& \\e033 octal character \\& \\ex1b hexadecimal character " "\\& \\ec[ control character \\& \\el change next character to lower case \\& " "\\eu change next character to upper case \\& \\eL change to lower case up to " "\\eE \\& \\eU change to upper case up to \\eE \\& \\eE end size modification " "\\& \\eQ quote regexp metacharacters up to \\eE" msgstr "" "\\& \\et tab (HT, TAB) \\& \\en nowalinia (LF, NL) \\& \\er return (CR) " "\\& \\ef form feed (FF) \\& \\eb backspace (BS) \\& \\ea alarm (dzwonek) " "(BEL) \\& \\ee escape (ESC) \\& \\e033 znak ósemkowy \\& \\ex1b znak " "szesnastkowy \\& \\ec[ znak sterujący \\& \\el zmień następny znak na małą " "literę \\& \\eu zmień następny znak na dużą literę \\& \\eL zmień na małą " "literę aż do \\eE \\& \\eU zmień na dużą literę aż do \\eE \\& \\eE koniec " "modyfikacji rozmiaru \\& \\eQ cytuj metaznaki regexp aż do \\eE" #. type: Plain text #: perlop.1:832 msgid "" "If CW is used, the case map reflects the local situation. See the " "manual page for B(1)." msgstr "" "Jeśli używane jest CW, mapa rozmiarów liter odpowiada lokalnej " "sytuacji. Zobacz podręcznik B(1)." #. type: Plain text #: perlop.1:837 msgid "" "Patterns are the basis for another level of interpretation -- as regular " "expressions. This is done as a second pass, after interpolating variables, so " "that regular expressions can be incorporated into the pattern from variables. " "If you don't want that, use CW<\\eQ>." msgstr "" "Wzorce są podstawą do innego poziomu interpretacji -- jako wyrażenia " "regularne. Jest to robione jako drugi przebieg, po interpolacji zmiennych, " "tak że wyrażenia regularne mogą być włączane do wzorca ze zmiennych. Jeśli " "tego nie chcesz, użyj CW<\\eQ>." #. type: Plain text #: perlop.1:843 msgid "" "Apart from the above, there are no multiple levels of interpolation. In fact, " "contrary to the expectations of shell programmers, backquotes do not " "interpolate within double quotes, and single quotes enclosed within double " "quotes do not impede the parsing of variables enclosed within them." msgstr "" "Poza powyższym, nie ma wielokrotnych poziomów interpolacji. W rzeczywistości, " "w przeciwieństwie do oczekiwań programistów powłokowych, odwrotne cudzysłowy " "nie interpolują w podwójnych cudzysłowach, a pojedyncze otoczone w podwójnych " "cudzysłowach nie utrudniają analizy zmiennych w nich zawartych." #. type: IX #: perlop.1:844 #, no-wrap msgid "Regexp Quote-Like Operators" msgstr "" #. type: Plain text #: perlop.1:847 msgid "" "Here are the quote-like operators that deal with pattern matching activities." msgstr "" "Oto cytatopodobne operatory, które dotyczą się działań związanych z " "porównywaniem wzorców." #. type: IX #: perlop.1:848 #, no-wrap msgid "?\\s-1PATTERN\\s0?" msgstr "?\\s-1WZORZEC\\s0?" #. type: Plain text #: perlop.1:854 msgid "" "This is something like a CW search, but between calls to the " "I operator, the match is one-time. This is a useful optimization if, " "for example, you only want to see the first occurrence of something in a file " "or set. Only CW patterns local to the current package are reset." msgstr "" "Jest to coś w rodzaju przeszukiwania CW, lecz między wywołaniami " "operatora I, trafienie jest jednokrotne. Jest to przydatna " "optymalizacja, jeśli np. chcesz zobaczyć tylko pierwsze pojawienie się czegoś " "w pliku, lub zbiorze. Resetowane są tylko wzorce CW, lokalne dla " "bieżącego pakietu." #. type: Plain text #: perlop.1:856 msgid "This usage is deprecated and may be removed in a future version of Perl." msgstr "" "To użycie jest niezalecane i może być usunięte w przyszłych wersjach perla." #. type: IX #: perlop.1:857 #, no-wrap msgid "m/\\s-1PATTERN/\\s0gimosx" msgstr "m/\\s-1WZORZEC/\\s0gimosx" #. type: IX #: perlop.1:859 #, no-wrap msgid "/\\s-1PATTERN/\\s0gimosx" msgstr "/\\s-1WZORZEC/\\s0gimosx" #. type: Plain text #: perlop.1:869 msgid "" "Searches for a pattern and in scalar context returns true (1), or false (''). " "If no string is supplied via the CW<=~> or CW operators, the string " "CW<$_> is searched for. (The string supplied by CW<=~> need not be the lvalue " "of \\*(-- it can be the result of evaluating an expression, but remember that " "CW<=~> binds quite tightly.) See also the I(1) manual page. See the " "I(1) manual page for a discussion of additional issues related to " "the use of CW." msgstr "" "Przeszukuje wzorzec dla trafienia i w kontekście skalarnym wzraca prawdę (1), " "lub fałsz (''). Jeśli nie podano żadnego łańcucha poprzez operator CW<=~>, " "lub CW, przeszukiwany jest łańcuch CW<$_>. (Łańcuch podany przez CW<=~> " "nie musi być lwartością \\*(-- może być wynikiem analizy wyrażenia, lecz " "pamiętaj, że CW<=~> wiąże dość mocno.) Zobacz też podręcznik I(1). " "Zobacz podręcznik I(1) dla dyskusji o dodatkowych sprawach, " "związanych z użyciem CW." #. type: Plain text #: perlop.1:871 perlop.1:1110 msgid "The options are:" msgstr "Opcje to:" #. type: Plain text #: perlop.1:879 msgid "" "\\& g Compare globally, on all occurrences \\& i Compare insensitively \\& m " "Treat string as multiple lines \\& o Compile pattern only once \\& s Treat " "string as single line \\& x Use extended regular expressions" msgstr "" "\\& g Porównuj globalnie, na wszystkich pojawieniach \\& i Porównuj bez " "zwracania uwagi na wielkość liter \\& m Traktuj łańcuch jako wielokrotne " "linie \\& o Kompiluj wzorzec tylko raz \\& s Traktuj łańcuch jako pojedynczą " "linię \\& x Użyj rozszerzonych wyrażeń regularnych" #. type: Plain text #: perlop.1:887 msgid "" "If the delimiter is \\*(L\"/\\*(R\", the leading CW is optional. When " "using CW, you can use any pair of non-whitespace, non-alphanumeric " "characters as delimiters. This is useful for comparing Unix pathnames, which " "may contain \\*(L\"/\\*(R\". This prevents \\s-1LTS\\s0 (narrow toothpick " "syndrome). If \\*(L\"?\\*(R\" is the delimiter, the match-once-only rule of " "CW is applied." msgstr "" "Jeśli ogranicznikiem jest \\*(L\"/\\*(R\", to początkowe CW jest " "opcjonalne. Używając CW, możesz wykorzystać jako ograniczniki dowolną " "parę nialfanumerycznych, niebiałospacjowych znaków. Jest to przydatne do " "porównywania unixowych nazw ścieżek, które mogą zawierać \\*(L\"/\\*(R\". " "Zapobiega to \\s-1LTS\\s0 (syndrom wąskiej wykałaczki). Jeśli \\*(L\"?" "\\*(R\" jest ogranicznikiem, to stosowana jest reguła trafienia-tylko-raz " "instrukcji CW." #. type: Plain text #: perlop.1:897 msgid "" "\\s-1PATTERN\\s0 can contain variables that will be interpolated (and the " "pattern recompiled) with each analysis. (Note that CW<$)> and CW<$|> may not " "be interpolated, since they look like end-of-string tests.) If you want such " "patterns to be compiled only once, append CW to the last delimiter. This " "prevents expensive runtime compilation and is useful when the value you are " "using does not change during the life of the script. However, remember that " "the CW option promises that you will not change the variables in the " "pattern. If you do change them, Perl will not notice." msgstr "" "\\s-1WZORZEC\\s0 może zawierać zmienne, które będą interpolowane (a wzorzec " "rekompilowany) za każdą analizą. (Zauważ, że CW<$)> i CW<$|> mogą nie być " "interpolowane, gdyż wyglądają jak testy końca łańcucha.) Jeśli chcesz, by " "takie wzorce były kompilowane tylko raz, dodaj do ostatniego ogranicznika " "znak CW. Zapobiega to kosztownej kompilacji czasu działania i jest " "przydatne, gdy wartość, z której korzystasz nie zmienia się w czasie życia " "skryptu. Jednak pamiętaj, że opcja CW daje obietnicę, iż nie zmienisz " "zmiennych ze wzorca. Jeśli je zmienisz, perl tego nie zauważy." #. type: Plain text #: perlop.1:900 msgid "" "If \\s-1PATTERN\\s0 is parsed as a null string, the last regular expression " "executed is used." msgstr "" "Jeśli \\s-1WZORZEC\\s0 zostanie zanalizowany jako łańcuch null, to użyte " "zostanie ostatnie wykonane wyrażenie regularne." #. type: Plain text #: perlop.1:908 msgid "" "In a context requiring a list value, pattern matching returns a list " "consisting of the list of subexpressions matched by the parentheses in " "pattern, e.g. (CW<$1>, CW<$2>, CW<$3>...). (Note that CW<$1> etc. are also " "set here, and that this differs from Perl 4 behavior.) If the comparison " "fails, a null array is returned. If the comparison succeeds but there are no " "parentheses, a list value (1) is returned." msgstr "" "W kontekście, wymagającym wartości listowej, porównanie wzorca zwraca listę, " "składającą się z listy podwyrażeń, trafionych przez nawiasy z wzorca, np. " "(CW<$1>, CW<$2>, CW<$3>...). (Zauważ, że ustawione tu są również CW<$1> itp. " "i że różni się to od zachowania perla 4.) Jeśli porównanie się nie powiedzie, " "zwracana jest tablica null. Jeśli porównanie się powiedzie, lecz nie będzie " "nawiasów, zwracana zostanie wartość listowa (1)." #. type: Plain text #: perlop.1:910 perlop.1:962 perlop.1:1134 perlop.1:1235 msgid "Examples:" msgstr "Przykłady:" #. type: Plain text #: perlop.1:914 msgid "" "\\& open(TTY, '/dev/tty'); \\& ETTYE =~ /^y/i && foo(); # do foo if " "necessary" msgstr "" "\\& open(TTY, '/dev/tty'); \\& ETTYE =~ /^y/i && foo(); # zrób foo, " "jeśli trzeba" #. type: Plain text #: perlop.1:917 msgid "\\& if (/Version: *([0-9.]*)/) { $version = $1; }" msgstr "\\& if (/Version: *([0-9.]*)/) { $version = $1; }" #. type: Plain text #: perlop.1:920 msgid "\\& next if m#^/usr/spool/uucp#;" msgstr "\\& next if m#^/usr/spool/uucp#;" #. type: Plain text #: perlop.1:927 msgid "" "\\& # poor man's grep \\& $arg = shift; \\& while (EE) { \\& print " "if /$arg/o; # compile only once \\& }" msgstr "" "\\& # grep biedaka \\& $arg = shift; \\& while (EE) { \\& print if /" "$arg/o; # kompiluj tylko raz \\& }" #. type: Plain text #: perlop.1:930 msgid "\\& if (($F1, $F2, $Etc) = ($foo =~ /^(\\eS+)\\es+(\\eS+)\\es*(.*)/))" msgstr "\\& if (($F1, $F2, $Etc) = ($foo =~ /^(\\eS+)\\es+(\\eS+)\\es*(.*)/))" #. type: Plain text #: perlop.1:935 msgid "" "The last example splits CW<$foo> into the first two words and the rest of the " "line. It assigns these three fields to CW<$F1>, CW<$F2>, and CW<$Etc>. The " "condition is true if any of the variables have been assigned values, that is, " "if the pattern is matched." msgstr "" "Ostatni przykład dzieli CW<$foo> na pierwsze dwa słowa i resztę linii. " "Przypisuje te trzy pola do CW<$F1>, CW<$F2> i CW<$Etc>. Warunek jest " "prawdziwy, jeśli przypisane zostały wartości którejkolwiek ze zmiennych, " "czyli jeśli wzorzec został trafiony." #. type: Plain text #: perlop.1:942 msgid "" "The CW modifier specifies global pattern matching \\*(-- i.e., where " "there are as many matches as possible in a given string. The behavior of this " "depends on the context -- in a list match, a list of all substrings matched " "by all the parentheses of the regular expression is returned. If there were " "no parentheses, a list of matched strings is returned, as if there were " "parentheses around the entire pattern." msgstr "" "Modyfikator CW określa globalne porównywanie wzorców \\*(-- tj. takie, " "gdzie trafień jest tyle ile się da w danym łańcuchu. Zachowanie tego zależy " "od kontektu -- w listowym zwracana jest lista wszystkich podłańcuchów, " "trafionych przez wszystkie nawaisy wyrażenia regularnego. Jeśli nie było " "nawiasów, zwracana jest lista trafionych łańcuchów, tak jakby były nawiasy " "wokół całego wzorca." #. type: Plain text #: perlop.1:952 msgid "" "In scalar context, CW<,//g> iterates through the string, returning " "\\s-1TRUE\\s0 on each hit, and \\s-1FALSE\\s0 on no hit. (In other words, it " "remembers the last position and restarts from there. You can find the current " "position of the hit using the I function; see its manual page for " "B(1).) A no hit normally resets the search position to the " "beginning of the string, but you can override this by adding the " "\\*(L\"c\\*(R\" modifier (e.g. CW). Modifying the target string also " "resets the search position." msgstr "" "W kontekście skalarnym, CW<,//g> iteruje poprzez łańcuch, zwracając " "\\s-1TRUE\\s0 za każdym trafieniem i \\s-1FALSE\\s0 przy braku trafienia. " "(Innymi słowy, zapamiętuje ostatnią pozycję i restartuje od tego miejsca. " "Możesz znaleźć bieżącą pozycję trafienia przy użyciu funkcji I; zobacz " "jej opis w podręczniku B(1).) Brak trafienia normalnie resetuje " "pozycję przeszukiwania na początek łańcucha, lecz możesz temu zapobiec, " "dodając modyfikator \\*(L\"c\\*(R\" (np. CW). Modyfikowanie łańcucha " "docelowego również resetuje pozycję przeszukiwania." #. type: Plain text #: perlop.1:960 msgid "" "You can mix CW comparisons with CW, where CW<\\eG> is a " "zero-width assertion that lands in exactly the same position where any " "previous CW ended up. The CW<\\eG> assertion is not supported without " "the CW modifier; currently without CW, CW<\\eG> behaves just like " "CW<\\eA>, but this is random and may change in the future." msgstr "" "Możesz mieszać porównania CW z CW, gdzie CW<\\eG> jest " "zapewnieniem zerowej szerokości, które trafia w dokładnie tę samą pozycję, " "gdzie skończył ewentualny poprzedni CW. Zapewnienie CW<\\eG> nie jest " "obsługiwane bez modyfikatora CW; obecnie bez CW, CW<\\eG>, zachowuje " "się zupełnie jak CW<\\eA>, lecz jest to przypadkowe i może się w przyszłości " "zmienić." #. type: Plain text #: perlop.1:966 msgid "" "\\& # list context \\& ($one,$five,$fifteen) = (`uptime` =~ /(\\ed+\\e.\\ed+)/" "g);" msgstr "" "\\& # kontekst listowy \\& ($one,$five,$fifteen) = (`uptime` =~ /(\\ed+\\e." "\\ed+)/g);" #. type: Plain text #: perlop.1:976 msgid "" "\\& # scalar context \\& $/ = \"\"; $* = 1; # $*, not recommended in modern " "Perl \\& while (defined($paragraph = EE)) { \\& while ($paragraph =~ /" "[a-z]['\")]*[.!?]+['\")]*\\es/g) { \\& $sentences++; \\& } \\& } \\& print " "\"$sentences\\en\";" msgstr "" "\\& # kontekst skalarny \\& $/ = \"\"; $* = 1; # $*, niezalecany w " "nowoczesnych perlach \\& while (defined($paragraph = EE)) { \\& while " "($paragraph =~ /[a-z]['\")]*[.!?]+['\")]*\\es/g) { \\& $sentences++; \\& } " "\\& } \\& print \"$sentences\\en\";" #. type: Plain text #: perlop.1:988 msgid "" "\\& # używanie m//gc z \\eG \\& $_ = \"ppooqppqq\"; \\& while ($i++ E 2) " "{ \\& print \"1: '\"; \\& print $1 while /(o)/gc; print \"', pos=\", pos, " "\"\\en\"; \\& print \"2: '\"; \\& print $1 if /\\eG(q)/gc; print \"', pos=\", " "pos, \"\\en\"; \\& print \"3: '\"; \\& print $1 while /(p)/gc; print \"', " "pos=\", pos, \"\\en\"; \\& }" msgstr "" "\\& # używanie m//gc z \\eG \\& $_ = \"ppooqppqq\"; \\& while ($i++ E 2) " "{ \\& print \"1: '\"; \\& print $1 while /(o)/gc; print \"', pos=\", pos, " "\"\\en\"; \\& print \"2: '\"; \\& print $1 if /\\eG(q)/gc; print \"', pos=\", " "pos, \"\\en\"; \\& print \"3: '\"; \\& print $1 while /(p)/gc; print \"', " "pos=\", pos, \"\\en\"; \\& }" #. type: Plain text #: perlop.1:990 msgid "The last example should give:" msgstr "Ostatni przykład powinien dać:" #. type: Plain text #: perlop.1:998 msgid "" "\\& 1: 'oo', pos=4 \\& 2: 'q', pos=5 \\& 3: 'pp', pos=7 \\& 1: '', pos=7 \\& " "2: 'q', pos=8 \\& 3: '', pos=8" msgstr "" "\\& 1: 'oo', pos=4 \\& 2: 'q', pos=5 \\& 3: 'pp', pos=7 \\& 1: '', pos=7 \\& " "2: 'q', pos=8 \\& 3: '', pos=8" #. type: Plain text #: perlop.1:1004 msgid "" "A useful idiom for scanners like CW is CW. You can combine " "different kinds of regular expressions in this way, allowing you to process a " "string piece by piece, doing different things depending on which expression " "it hits. Each expression tries to pick up where the last one left off." msgstr "" "Przydatnym idiomem dla skanerów w rodzaju CW jest CW. " "Możesz tak łączyć różne rodzaje wyrażeń regularnych, mając tak możliwość " "przetwarzania łańcucha kawałek po kawałku, dokonując różnych akcji, zależnie " "od tego, które wyrażenie zostało trafione. Każde wyrażenie próbuje trafić " "tam, gdzie poprzednie zakończyło." #. type: Plain text #: perlop.1:1020 msgid "" "\\& $_ = EE'EOL'; \\& $url = new URI::URL \"http://www/\"; die if " "$url eq \"xXx\"; \\& EOL \\& LOOP: \\& { \\& print(\" digits\"), redo LOOP " "if /\\eG\\ed+\\eb[,.;]?\\es*/gc; \\& print(\" lowercase\"), redo LOOP if /" "\\eG[a-z]+\\eb[,.;]?\\es*/gc; \\& print(\" UPPERCASE\"), redo LOOP if /\\eG[A-" "Z]+\\eb[,.;]?\\es*/gc; \\& print(\" Capitalized\"), redo LOOP if /\\eG[A-Z][a-" "z]+\\eb[,.;]?\\es*/gc; \\& print(\" MiXeD\"), redo LOOP if /\\eG[A-Za-z]+" "\\eb[,.;]?\\es*/gc; \\& print(\" alphanumeric\"), redo LOOP if /\\eG[A-Za-" "z0-9]+\\eb[,.;]?\\es*/gc; \\& print(\" line-noise\"), redo LOOP if /\\eG[^A-" "Za-z0-9]+/gc; \\& print \". That's all!\\en\"; \\& }" msgstr "" "\\& $_ = EE'EOL'; \\& $url = new URI::URL \"http://www/\"; die if " "$url eq \"xXx\"; \\& EOL \\& LOOP: \\& { \\& print(\" digits\"), redo LOOP " "if /\\eG\\ed+\\eb[,.;]?\\es*/gc; \\& print(\" lowercase\"), redo LOOP if /" "\\eG[a-z]+\\eb[,.;]?\\es*/gc; \\& print(\" UPPERCASE\"), redo LOOP if /\\eG[A-" "Z]+\\eb[,.;]?\\es*/gc; \\& print(\" Capitalized\"), redo LOOP if /\\eG[A-Z][a-" "z]+\\eb[,.;]?\\es*/gc; \\& print(\" MiXeD\"), redo LOOP if /\\eG[A-Za-z]+" "\\eb[,.;]?\\es*/gc; \\& print(\" alphanumeric\"), redo LOOP if /\\eG[A-Za-" "z0-9]+\\eb[,.;]?\\es*/gc; \\& print(\" line-noise\"), redo LOOP if /\\eG[^A-" "Za-z0-9]+/gc; \\& print \". That's all!\\en\"; \\& }" #. type: Plain text #: perlop.1:1022 msgid "Here is the output (split over multiple lines):" msgstr "Oto wyjście (podzielone na kilka linii):" #. type: Plain text #: perlop.1:1028 msgid "" "\\& line-noise lowercase line-noise lowercase UPPERCASE line-noise \\& " "UPPERCASE line-noise lowercase line-noise lowercase line-noise \\& lowercase " "lowercase line-noise lowercase lowercase line-noise \\& MiXeD line-noise. " "That's all!" msgstr "" "\\& line-noise lowercase line-noise lowercase UPPERCASE line-noise \\& " "UPPERCASE line-noise lowercase line-noise lowercase line-noise \\& lowercase " "lowercase line-noise lowercase lowercase line-noise \\& MiXeD line-noise. " "That's all!" #. type: IX #: perlop.1:1030 #, no-wrap msgid "q/\\s-1STRING\\s0/" msgstr "q/\\s-1ŁAŃCUCH\\s0/" #. type: IX #: perlop.1:1032 #, no-wrap msgid "CW<'STRING'>" msgstr "CW<'ŁAŃCUCH'>" #. type: Plain text #: perlop.1:1037 msgid "" "A single quoted literal string. A backslash matches a backslash, unless it is " "followed by a delimiter or another backslash -- in which case the backslash " "or delimiter is interpolated." msgstr "" "Pojedynczo zacytowany łańcuch literalny. Odwrotny ukośnik oznacza odwrotny " "ukośnik, chyba że znajduje się za nim ogranicznik lub inny odwrotny ukośnik " "-- w tym wypadku odwrotny ukośnik, lub ogranicznik jest interpolowany." #. type: Plain text #: perlop.1:1042 msgid "" "\\& $foo = q!I said, \"You said, 'She said it.'\"!; \\& $bar = q('This is " "it.'); \\& $baz = '\\en'; # two-character string" msgstr "" "\\& $foo = q!I said, \"You said, 'She said it.'\"!; \\& $bar = q('This is " "it.'); \\& $baz = '\\en'; # łańcuch dwuznakowy" #. type: IX #: perlop.1:1044 #, no-wrap msgid "qq/\\s-1STRING\\s0/" msgstr "qq/\\s-1ŁAŃCUCH\\s0/" #. type: IX #: perlop.1:1046 #, no-wrap msgid "\\*(N" msgstr "\\*(N" #. type: IX #: perlop.1:1046 #, no-wrap msgid "\\s-1STRING\\s0\\*(T\"\"" msgstr "\\s-1ŁAŃCUCH\\s0\\*(T\"\"" #. type: Plain text #: perlop.1:1048 msgid "A string in double quotes, interpolated." msgstr "Łańcuch w podwójnych cudzysłowach, interpolowany." #. type: Plain text #: perlop.1:1054 msgid "" "\\& $_ .= qq \\& (*** The previous line contains the naughty word \"$1\"." "\\en) \\& if /(tcl|rexx|python)/; # :-) \\& $baz = \"\\en\"; # single " "character string" msgstr "" "\\& $_ .= qq \\& (*** The previous line contains the naughty word \"$1\"." "\\en) \\& if /(tcl|rexx|python)/; # :-) \\& $baz = \"\\en\"; # łańcuch " "jednoznakowy" #. type: IX #: perlop.1:1056 #, no-wrap msgid "qx/\\s-1STRING\\s0/" msgstr "qx/\\s-1ŁAŃCUCH\\s0/" #. type: IX #: perlop.1:1058 #, no-wrap msgid "`\\s-1STRING\\s0`" msgstr "`\\s-1ŁAŃCUCH\\s0`" #. type: Plain text #: perlop.1:1064 msgid "" "A string that is interpolated and then run as a system command. The collected " "standard output of the command is returned. In scalar context, it appears as " "a single, multi-line string. In list context, it is separated into a list of " "lines (however you defined $/ lines or CW<$INPUT_RECORD_SEPARATOR>)." msgstr "" "Łańcuch, który jest interpolowany, a następnie uruchamainay jako komenda " "systemowa. Zebrane standardowe wyjście komendy jest zwracane. W kontekście " "skalarnym, pojawia się jako pojedynczy, wieloliniowy łańcuch. W kontekście " "listowym, jest rozdzielony na listę linii (jakkolwiek zdefiniowałeś linie $/ " "lub CW<$INPUT_RECORD_SEPARATOR>)." #. type: Plain text #: perlop.1:1067 msgid "\\& $today = qx{ date };" msgstr "\\& $today = qx{ date };" #. type: Plain text #: perlop.1:1069 msgid "See the section on I/O operators." msgstr "Zobacz sekcję o operatorach I/O." #. type: IX #: perlop.1:1070 #, no-wrap msgid "qw/\\s-1STRING\\s0/" msgstr "qw/\\s-1ŁAŃCUCH\\s0/" #. type: Plain text #: perlop.1:1073 msgid "" "Returns a list of words, extracted from a string using embedded whitespace " "characters as word delimiters. This is equivalent to" msgstr "" "Zwraca listę słów, wyciągniętych z łańcucha przy użyciu osadzonych białych " "spacji, jako ograniczników słów. Jest to równoważne" #. type: Plain text #: perlop.1:1076 msgid "\\& split(' ', q/STRING/);" msgstr "\\& split(' ', q/ŁAŃCUCH/);" #. type: Plain text #: perlop.1:1078 msgid "Some frequently used examples:" msgstr "Pewne często używane przykłady:" #. type: Plain text #: perlop.1:1082 msgid "" "\\& use POSIX qw( setlocale localeconv ) \\& @EXPORT = qw( foo bar baz );" msgstr "" "\\& use POSIX qw( setlocale localeconv ) \\& @EXPORT = qw( foo bar baz );" #. type: Plain text #: perlop.1:1086 msgid "" "A common mistake is to try to separate words with a comma, or to insert " "comments into multi-line strings. In this situation, the CW<-w> switch " "produces warnings if the string contains the characters \\*(L\"#\\*(R\"." msgstr "" "Częstym błędem jest próba rozdzielania słów przecinkiem, lub wstwianie do " "wieloliniowych łańcuchów qw komentarzy. W tej sytuacji, przełącznik CW<-w> " "daje ostrzeżenia jeśli łańcuch zawiera znaki \\*(L\"#\\*(R\"." #. type: IX #: perlop.1:1087 #, no-wrap msgid "s/\\s-1PATTERN/REPLACEMENT/\\s0egimosx" msgstr "" #. type: Plain text #: perlop.1:1091 msgid "" "Looks for a pattern in a string, and if it finds one, replaces it with the " "replacement text and returns the number of replacements. Otherwise, it " "returns false (specifically, the empty string)." msgstr "" "Szuka w łańcuchu wzorca, a jeśli go znajdzie, to zamienia go tekstem zamiany " "i zwraca liczbę zamian. W przeciwnym wypadku zwraca fałsz (specyficznie pusty " "łańcuch)." #. type: Plain text #: perlop.1:1096 msgid "" "If no string is supplied by the CW<=~> or CW operator, the variable " "CW<$_> is used. (The string supplied by CW<=~> must be a scalar variable, an " "element of an array, an associative array, or an assignment to one of these, " "i.e. an lvalue.)" msgstr "" "Jeśli przez operator CW<=~> lub CW nie podano łańcucha, używana jest " "zmienna CW<$_>. (Łańcuch podany przez CW<=~> musi być zmienną skalarną, " "elementem tablicy, tablicy asocjacyjnej, lub przypisaniem do jednego z nich, " "czyli lwartością.)" #. type: Plain text #: perlop.1:1108 msgid "" "If the chosen delimiter is a single quote, neither \\s-1PATTERN\\s0 nor " "\\s-1REPLACEMENT\\s0 are interpolated. Otherwise, if \\s-1PATTERN\\s0 " "contains $, which looks more like a variable than an end-of-string test, the " "variable will be interpolated at runtime. If you want the pattern to be " "compiled only once, the first time the variable is interpolated, use the CW option. If the pattern is parsed as a null string, the last normal regular " "expression is used instead. See also the B(1) manual page. Also see " "B(1) for the effects of CW." msgstr "" "Jeśli wybrany ogranicznik jest pojedynczym cudzysłowem, nie dokonywana jest " "interpolacja ani zmiennych \\s-1WZORCA\\s0, ani \\s-1ZAMIANY\\s0. W " "przeciwnym wypadku, jeśli \\s-1WZORZEC\\s0 zawiera $, który wygląda bardziej " "jak zmienna, niż test końca łańcucha, zmienna będzie interpolowana w czasie " "działania. Jeśli chcesz, by wzorzec był kompilowany tylko raz, za pierwszą " "interpolacją zmiennej, użyj opcji CW. Jeśli wzorzec jest analizowany jako " "łańcuch null, uzywane jest zamiast tego ostatnie normalne wyrażenie " "regularne. Zobacz jeszcze podręcznik B(1). Zobacz też " "B(1), aby dowiedzieć się o wpływie CW." #. type: Plain text #: perlop.1:1119 msgid "" "\\& e Parse the right side as an expression \\& g Replace globally \\& i " "Don't care about case \\& m Treat the string as multiple lines \\& o Compile " "the pattern only once \\& s Treat the string as a single line \\& x Use " "extended regular expressions" msgstr "" "\\& e Analizuj prawą stronę jako wyrażenie \\& g Zamieniaj globalnie \\& i " "Nie zwracaj uwagi na wielkość liter \\& m Traktuj łańcuch jak wiele linii \\& " "o Kompiluj wzorzec tylko raz \\& s Traktuj łańcuch jako pojedynczą linię \\& " "x Użyj rozszerzonych wyrażeń regularnych" #. type: Plain text #: perlop.1:1132 msgid "" "Backslashes may be replaced by any non-alphanumeric, non-whitespace " "delimiter. If single quotes are used, no expansion of the replacement string " "is done (the CW modifier overrides this behavior). Unlike Perl 4, Perl 5 " "treats backquotes as normal delimiters; the replacement text is not executed " "as a command. If \\s-1PATTERN\\s0 is delimited by bracket quotes, " "\\s-1REPLACEMENT\\s0 has its own quote pair, which may or may not be bracket " "quotes, e.g. CW or CWfooE/bar/>. CW will cause " "the replacement portion to be interpreted as a full Perl expression and " "Ied immediately afterwards. Its syntax is, however, checked at " "compile time." msgstr "" "Ukośniki mogą być zamienione przez dowolny, niealfanumeryczny i " "niebiałospacjowy ogranicznik. Jeśli użyte są pojedyncze cudzysłowy, nie " "dokonywana jest interpretacja łańcucha zamiany (modyfikator CW przeciąża " "to zachowanie). W przeciwnieństwie do perla 4, perl 5 traktuje odwrotne " "cudzysłowy jako normalne ograniczniki; tekst zamiany nie jest wykonywany jako " "komenda. Jeśli \\s-1WZORZEC\\s0 jest rozdzielany cytatami nawiasowymi, " "\\s-1ZAMIANA\\s0 ma swoją własną parę cytatów, która może, lub nie, być " "cytatami nawiasowymi, np. CW lub CWfooE/bar/>. CW spowoduje, że porcja zamiany zostanie zinterpretowana jako pełne perlowe " "wyrażenie i zIowana zaraz potem. Jego składnia jest jednak " "sprawdzania podczas kompilacji." #. type: Plain text #: perlop.1:1137 msgid "\\& s/\\ebgreen\\eb/mauve/g; # don't change wintergreen" msgstr "\\& s/\\ebgreen\\eb/mauve/g; # nie zmieniaj wintergreen" #. type: Plain text #: perlop.1:1140 msgid "\\& $path =~ s|/usr/bin|/usr/local/bin|;" msgstr "\\& $path =~ s|/usr/bin|/usr/local/bin|;" #. type: Plain text #: perlop.1:1143 msgid "\\& s/Login: $foo/Login: $bar/; # time pattern of operation" msgstr "\\& s/Login: $foo/Login: $bar/; # wzorzec czasu działania" #. type: Plain text #: perlop.1:1146 msgid "\\& ($foo = $bar) =~ s/this/that/;" msgstr "\\& ($foo = $bar) =~ s/this/that/;" #. type: Plain text #: perlop.1:1149 msgid "\\& $count = ($paragraph =~ s/Mister\\eb/Mr./g);" msgstr "\\& $count = ($paragraph =~ s/Mister\\eb/Mr./g);" #. type: Plain text #: perlop.1:1155 msgid "" "\\& $_ = 'abc123xyz'; \\& s/\\ed+/$&*2/e; # daje 'abc246xyz' \\& s/\\ed+/" "sprintf(\"%5d\",$&)/e; # daje 'abc 246xyz' \\& s/\\ew/$& x 2/eg; # daje " "'aabbcc 224466xxyyzz'" msgstr "" "\\& $_ = 'abc123xyz'; \\& s/\\ed+/$&*2/e; # daje 'abc246xyz' \\& s/\\ed+/" "sprintf(\"%5d\",$&)/e; # daje 'abc 246xyz' \\& s/\\ew/$& x 2/eg; # daje " "'aabbcc 224466xxyyzz'" #. type: Plain text #: perlop.1:1160 msgid "" "\\& s/%(.)/$percent{$1}/g; # change percentage escapes; without /e \\& s/%(.)/" "$percent{$1} || $&/ge; # now with the expression, with /e \\& s/^=(\\ew+)/" "&pod($1)/ge; # use function call" msgstr "" "\\& s/%(.)/$percent{$1}/g; # zmień eskejpy procentowe; bez /e \\& s/%(.)/" "$percent{$1} || $&/ge; # teraz z wyrażenim, z /e \\& s/^=(\\ew+)/&pod($1)/ge; " "# użyj wywołania funkcji" #. type: Plain text #: perlop.1:1165 msgid "" "\\& # /e can nest; this will expand \\& # simple variables embedded in $_ \\& " "s/(\\e$\\ew+)/$1/eeg;" msgstr "" "\\& # /e mogą się zagnieżdżać; to rozwinie \\& # proste zmienne osadzone w $_ " "\\& s/(\\e$\\ew+)/$1/eeg;" #. type: Plain text #: perlop.1:1173 msgid "" "\\& # Remove comments C \\& $program =~ s { \\& /\\e* # Match the opening " "delimiter. \\& .*? # Match the minimum number of characters. \\& \\e*/ # " "Match the closing delimiter. \\& } []gsx;" msgstr "" "\\& # Usuń komentarze C \\& $program =~ s { \\& /\\e* # Traf na rozdzielacz " "otwierający. \\& .*? # Traf w minimalną liczbę znaków. \\& \\e*/ # Traf w " "rozdzielacz zamykający. \\& } []gsx;" #. type: Plain text #: perlop.1:1176 msgid "\\& s/^\\es*(.*?)\\es*$/$1/; # cut off white space" msgstr "\\& s/^\\es*(.*?)\\es*$/$1/; # odetnij białą spację" #. type: Plain text #: perlop.1:1179 msgid "\\& s/([^ ]*) *([^ ]*)/$2 $1/; # swap first 2 fields" msgstr "\\& s/([^ ]*) *([^ ]*)/$2 $1/; # zamień 1-sze 2 pola" #. type: Plain text #: perlop.1:1183 msgid "" "Notice that in the last example \\e is used instead of $. Unlike B(1)a, " "we use the form \\eEIE only on the left side. Everywhere else, " "it is $EIE." msgstr "" "Zauważ, że w ostatnim przykładzie zamiast $ użyto \\e. W przeciwieństwie do " "B(1)a, używamy postaci \\eEIE tylko po lewej stronie. " "Wszędzie indziej, jest to $EIE." #. type: Plain text #: perlop.1:1186 msgid "" "Sometimes you can't just use CW for all the changes to happen. Here are " "two common cases:" msgstr "" "Czasami nie można użyć po prostu CW, aby zaszły wszystkie zmiany. Oto " "dwa popularne przypadki:" #. type: Plain text #: perlop.1:1191 msgid "" "\\& # insert commas in the appropriate integer places \\& 1 while s/(.*\\ed)" "(\\ed\\ed\\ed)/$1,$2/g; # perl4 \\& 1 while s/(\\ed)(\\ed\\ed\\ed)(?!\\ed)/" "$1,$2/g; # perl5" msgstr "" "\\& # wstaw przecinki we właściwych miejscach integera \\& 1 while s/(.*\\ed)" "(\\ed\\ed\\ed)/$1,$2/g; # perl4 \\& 1 while s/(\\ed)(\\ed\\ed\\ed)(?!\\ed)/" "$1,$2/g; # perl5" #. type: Plain text #: perlop.1:1195 msgid "" "\\& # expand tabs to 8-column spaces \\& 1 while s/\\et+/' ' x (length($&)*8 " "- length($`)%8)/e;" msgstr "" "\\& # rozwiń tabulacje na 8-kolumnowe spacje \\& 1 while s/\\et+/' ' x " "(length($&)*8 - length($`)%8)/e;" #. type: IX #: perlop.1:1197 #, no-wrap msgid "tr/\\s-1SEARCHLIST/REPLACEMENTLIST/\\s0cds" msgstr "" #. type: IX #: perlop.1:1199 #, no-wrap msgid "y/\\s-1SEARCHLIST/REPLACEMENTLIST/\\s0cds" msgstr "" #. type: IX #: perlop.1:1199 #, no-wrap msgid "8" msgstr "8" #. type: Plain text #: perlop.1:1210 msgid "" "Translates all occurrences of characters found in the search list to the " "corresponding characters in the replacement list. Returns the number of " "characters replaced or deleted. If no string is supplied with the =~ or !~ " "operator, CW<$_> is used. (The string specified by =~ must be a scalar " "variable, an array element, an associative array element, or an assignment to " "one of these, i.e., an lvalue.) For B(1) enthusiasts, a synonym for " "CW is provided called CW. If \\s-1SEARCHLIST\\s0 is bracketed, then " "\\s-1REPLACEMENTLIST\\s0 need not have brackets, e.g., CW or " "CW." msgstr "" "Tłumaczy wszystkie pojawienia się znaków, znalezione w liście szukania, na " "odpowiadające znaki z listy zamiany. Zwraca liczbę zamienionych, lub " "skasowanych znaków. Jeśli nie podano łańcucha w operatorze =~ lub !~, używane " "jest CW<$_>. (Łańcuch określony przez =~ musi być zmienną skalarną, elementem " "tablicy, elementem tablicy asocjacyjnej, lub przypisaniem do jednego z nich, " "czyli lwartością). Dla miłośników edytora B(1), udostępniono synonim " "CW pod nazwą CW. Jeśli \\s-1LISTASZUKANIA\\s0 jest rozdzielona " "nawiasami, to \\s-1LISTAZAMIANY\\s0 nie musi ich mieć, np. CW " "lub CW." #. type: Plain text #: perlop.1:1212 msgid "Options:" msgstr "Opcje:" #. type: Plain text #: perlop.1:1217 msgid "" "\\& c Complete SEARCHLIST \\& d Delete found but not replaced characters \\& " "s Squash duplicate replaced characters" msgstr "" "\\& c Dopełnij LISTĘSZUKANIA \\& d Kasuj znalezione, lecz niezamienione znaki " "\\& s Zmiażdż zduplikowane zamienione znaki" #. type: Plain text #: perlop.1:1225 msgid "" "If the CW modifier is given, the set of characters from " "\\s-1SEARCHLIST\\s0 is complemented. If the CW modifier is given, any " "characters given in \\s-1SEARCHLIST\\s0 but not found in " "\\s-1REPLACEMENTLIST\\s0 are deleted. If the CW modifier is given, then " "sequences that translate to the same character are crushed to a single " "instance of that character." msgstr "" "Jeśli podany jest modyfikator CW, zbiór znaków z \\s-1LISTYSZUKANIA\\s0 " "jest dopełniany. Jeśli podany jest modyfikator CW, wszelkie znaki, podane " "w \\s-1LIŚCIESZUKANIA\\s0, a nie znalezione w \\s-1LIŚCIEZAMIANY\\s0 są " "kasowane. Jeśli podany jest modyfikator CW, to sekwencje, które zostały " "przetłumaczone do tego samego znaku są miażdżone do pojedynczej instancji " "tego znaku." #. type: Plain text #: perlop.1:1233 msgid "" "If the CW modifier is used, \\s-1REPLACEMENTLIST\\s0 is always " "interpreted as given. Otherwise, if \\s-1REPLACEMENTLIST\\s0 is shorter than " "\\s-1SEARCHLIST\\s0, the last character of it is replicated until it fills " "the missing spaces. If \\s-1REPLACEMENTLIST\\s0 is null, then " "\\s-1SEARCHLIST\\s0 is replicated. This is useful for counting characters in " "a class, or for crushing character sequences of the class." msgstr "" "Jeśli użyty jest modyfikator CW, \\s-1LISTAZAMIANY\\s0 jest zawsze " "interpretowana tak, jak jest podana. W przeciwnym wypadku, gdy " "\\s-1LISTAZAMIANY\\s0 jest krótsza niż \\s-1LISTASZUKANIA\\s0, ostatni jej " "znak jest replikowany tak długo, aż wypełni brakujące miejsca. Jeśli " "\\s-1LISTAZAMIANY\\s0 jest null, to replikowana jest \\s-1LISTASZUKANIA\\s0. " "Jest to przydatne do zliczania znaków w klasie, lub dla miażdżenia sekwencji " "znakowych klasy." #. type: Plain text #: perlop.1:1238 msgid "\\& $ARGV[1] =~ tr/A-Z/a-z/; # change to lowercase" msgstr "\\& $ARGV[1] =~ tr/A-Z/a-z/; # zmień na małe litery" #. type: Plain text #: perlop.1:1241 msgid "\\& $cnt = tr/*/*/; # count stars in $_" msgstr "\\& $cnt = tr/*/*/; # zlicz gwiazdy w $_" #. type: Plain text #: perlop.1:1244 msgid "\\& $cnt = $sky =~ tr/*/*/; # count sockets in $sky" msgstr "\\& $cnt = $sky =~ tr/*/*/; # zlicz gniazdy w $sky" #. type: Plain text #: perlop.1:1247 msgid "\\& $cnt = tr/0-9//; # count digits in $_" msgstr "\\& $cnt = tr/0-9//; # zlicz cyfry w $_" #. type: Plain text #: perlop.1:1250 msgid "\\& tr/a-zA-Z//s; # bookkeeper -E bokeper" msgstr "\\& tr/a-zA-Z//s; # bookkeeper -E bokeper" #. type: Plain text #: perlop.1:1253 msgid "\\& ($HOST = $host) =~ tr/a-z/A-Z/;" msgstr "\\& ($HOST = $host) =~ tr/a-z/A-Z/;" #. type: Plain text #: perlop.1:1256 msgid "\\& tr/a-zA-Z/ /cs; # change non-alphabetical to spaces" msgstr "\\& tr/a-zA-Z/ /cs; # zmień niealfabetyczne na spacje" #. type: Plain text #: perlop.1:1260 msgid "\\& tr [\\e200-\\e377] \\& [\\e000-\\e177]; # delete 8th bit" msgstr "\\& tr [\\e200-\\e377] \\& [\\e000-\\e177]; # skasuj 8-my bit" #. type: Plain text #: perlop.1:1262 msgid "" "If multiple translations are given for a character, only the first one is " "used:" msgstr "Jeśli dla znaku podano wiele translacji, używana jest tylko pierwsza:" #. type: Plain text #: perlop.1:1265 msgid "\\& tr/AAA/XYZ/" msgstr "\\& tr/AAA/XYZ/" #. type: Plain text #: perlop.1:1267 msgid "will translate A to X." msgstr "przetłumaczy A na X." #. type: Plain text #: perlop.1:1272 msgid "" "Note that because the translation table is built at compile time, neither " "\\s-1SEARCHLIST\\s0 nor \\s-1REPLACEMENTLIST\\s0 are subject to quote " "interpolation. This means that if you want to use variables, you must use " "I:" msgstr "" "Zauważ, że z uwagi na to, że tablica translacji jest budowana w czasie " "kompilacji, ani \\s-1LISTASZUKANIA\\s0, ani \\s-1LISTAZAMIANY\\s0 nie " "podlegają interpolacji cudzysłowowej. Znaczy to, że jeśli chcesz używać " "zmiennych, musisz użyć I:" #. type: Plain text #: perlop.1:1276 msgid "\\& eval \"tr/$oldlist/$newlist/\"; \\& die $@ if $@;" msgstr "\\& eval \"tr/$oldlist/$newlist/\"; \\& die $@ if $@;" #. type: Plain text #: perlop.1:1279 msgid "\\& eval \"tr/$oldlist/$newlist/, 1\" or die $@;" msgstr "\\& eval \"tr/$oldlist/$newlist/, 1\" or die $@;" #. type: IX #: perlop.1:1281 #, no-wrap msgid "I/O Operators" msgstr "" #. type: Plain text #: perlop.1:1301 msgid "" "There are a number of I/O operators you should know about. A string enclosed " "in backquotes is first subjected to variable substitution, similar to a " "string enclosed in double quotes. It is then interpreted as a command, and " "its output is the value of the pseudo-literal, as in the shell. In scalar " "context, a single string consisting of the entire output is returned. In list " "context, a list of values ​​is returned for each line of output. (CW<$/> may be " "set, which overrides the default line terminator.) The command is executed " "each time the pseudo-literal is parsed. The status of the command is returned " "to CW<$?> (see the B(1) manual page). Unlike B(1), no \\*(-- " "newlines remain newlines on the return data. Unlike in all other shells, " "single quotes do not hide variable names in the command from expansion. To " "pass $ on, escape it with a backslash. The general form of backquotes is " "CW. (Since they are always also expanded by the shell, see the " "B(1) manual page for security issues.)" msgstr "" "Istnieje wiele operatorów I/O (wejścia/wyjścia), o których powinieneś " "wiedzieć. Łańcuch ujęty w odwrotne cudzysłowy podlega najpierw podstawieniu " "zmiennych, podobnie jak łańcuch ujęty w podwójne cudzysłowy. Następnie jest " "interpretowany jako komenda, a jej wyjście jest wartością pseudoliterału, jak " "w powłoce. W kontekście skalarnym, zwracany jest pojedynczy łańcuch, " "skłądający się z całego wyjścia. W kontekście listowym, zwracana jest lista " "wartości dla każdej linii wyjścia. (Można ustawić CW<$/>, co przeciąży " "domyślny terminator linii.) Komenda jest wykonywana przy każdej analizie " "pseudoliterału. Status komendy jest zwracany do CW<$?> (zobacz podręcznik " "B(1)). W przeciwieństwie do B(1), nie jest na danych " "zwracanych dokonywana translacja \\*(-- nowe linie pozostają nowymi liniami. " "W przeciwieństwie do wszelkich innych powłok, pojedyncze cudzysłowyu nie " "ukrywają nazw zmiennych w komendzie od interpretacji. Aby przekazać $ dalej, " "należy go wycytować odwrotnym ukośnikiem. Ogólną postacią odwrotnych " "cudzysłowów jest CW. (Ponieważ podlegają one zawsze również rozwinięciu " "przez powłokę, zobacz podręcznik B(1), który opisuje problemy " "bezpieczeństwa.)" #. type: Plain text #: perlop.1:1312 msgid "" "Parsing a filehandle that is in angle brackets extracts the next line from " "the file, or CW at the end of it. Normally, you would assign a value " "to the variable, but there is a situation where automatic assignment occurs. " "I the entry symbol is the only thing inside the loop " "condition of CW or CW, then the value is automatically " "assigned to the variable CW<$_>. The assigned value is then checked to see if " "it is defined. (This may seem a bit strange, but you will use this construct " "in almost every Perl script you write.) The following lines are equivalent:" msgstr "" "Analiza uchwytu pliku, który jest w nawiasach trójkątnych, wyciąga z pliku " "następną linię, lub CW na jego końcu. Normalnie, musisz zmiennej " "przypisać wartość, lecz jest sytuacja, w której następuje automatyczne " "przypisanie. I symbol wejścia jest jedyną " "rzeczą wewnątrz warunku pętli CW lub CW, to wartość jest " "przypisywana automatycznie zmiennej CW<$_>. Przypisana wartość jest potem " "sprawdzana, by zobaczyć czy jest zdefiniowane (Może się to wydawać trochę " "dziwne, lecz będziesz używać tej konstrukcji w prawie każdym swoim skrypcie " "perlowym.) Następujące linijki są sobie równoważne:" #. type: Plain text #: perlop.1:1319 msgid "" "\\& while (defined($_ = ESTDINE)) { print; } \\& while " "(ESTDINE) { print; } \\& for (;ESTDINE;) { print; } \\& print " "while defined($_ = ESTDINE); \\& print while ESTDINE;" msgstr "" "\\& while (defined($_ = ESTDINE)) { print; } \\& while " "(ESTDINE) { print; } \\& for (;ESTDINE;) { print; } \\& print " "while defined($_ = ESTDINE); \\& print while ESTDINE;" #. type: Plain text #: perlop.1:1326 msgid "" "(The filehandles \\s-1STDIN\\s0, \\s-1STDOUT\\s0, and \\s-1STDERR\\s0 are " "predefined filehandles. The filehandles CW, CW, and CW " "will also work, but not in packages where they are interpreted as local " "identifiers rather than global ones.) Additional filehandles can be created " "with the I function. See its description in B(1)." msgstr "" "Uchwyty plików \\s-1STDIN\\s0, \\s-1STDOUT\\s0 i \\s-1STDERR\\s0 to uchwyty " "predefiniowane. Uchwyty CW, CW i CW też będą działać, " "lecz nie w pakietach, w których są interpretowane jako lokalne identyfikatory " "nie zaś jako globalne.) Dodatkowe uchwyty plików można tworzyć funkcją " "I. Zobacz jej opis w podręczniku B(1)." #. type: Plain text #: perlop.1:1331 msgid "" "If E\\s-1FILEHANDLE\\s0 is used in a context expecting a list, a list is " "returned consisting of all the input lines, one line per list element. It is " "easy to waste such a large data area, so use this with caution." msgstr "" "Jeśli E\\s-1UCHWYTPLIKU\\s0 jest używany w kontekście, oczekującym listy, " "zwracana jest lista, składająca się ze wszystkich linii wejściowych, jedna " "linia na element listy. Łatwo jest zająć tak duży obszar danych, więc używaj " "tego ostrożnie." #. type: Plain text #: perlop.1:1341 msgid "" "The null filehandle EE is special and can be used to emulate the " "behavior of the B(1) or B(1) editors. Input from EE can " "come either from standard input or from any file listed on the command line. " "Here's how it works: the first time EE is parsed, the CW<@ARGV> array " "is checked and if it is null, CW<$ARGV[0]> is set to \\*(L\"-\\*(R\", which " "means standard input when opened. The CW<@ARGV> array is then parsed as a " "list of filenames. The loop" msgstr "" "Zerowy uchwyt pliku EE jest specjalny i może być używany do emulacji " "zachowania edytora B(1), lub B(1). Wejście z EE może " "nadchodzić zarówno ze standardowego wejścia, lub z każdego pliku, " "wymienionego w linii komend. Oto jak to działa: za pierwszą analizą " "EE, sprawdzana jest tablica CW<@ARGV> i jeśli jest zerowa, " "CW<$ARGV[0]> jest ustawiane na \\*(L\"-\\*(R\", co oznacza po otwarciu " "standardowe wejście. Tablica CW<@ARGV> jest następnie przetwarzana jako lista " "nazw plików. Pętla" #. type: Plain text #: perlop.1:1346 msgid "\\& while (EE) { \\& ... # code for each line \\& }" msgstr "\\& while (EE) { \\& ... # kod dla każdej linii \\& }" #. type: Plain text #: perlop.1:1348 msgid "is equivalent to the following pseudocode:" msgstr "jest równoważna następującemu pseudokodowi:" #. type: Plain text #: perlop.1:1357 msgid "" "\\& unshift(@ARGV, '-') unless @ARGV; \\& while ($ARGV = shift) { \\& " "open(ARGV, $ARGV); \\& while (EARGVE) { \\& ... # code for each line " "\\& } \\& }" msgstr "" "\\& unshift(@ARGV, '-') unless @ARGV; \\& while ($ARGV = shift) { \\& " "open(ARGV, $ARGV); \\& while (EARGVE) { \\& ... # kod dla każdej " "linii \\& } \\& }" #. type: Plain text #: perlop.1:1363 msgid "" "except that it's a bit prettier, and it works. It really just shifts the " "CW<@ARGV> array and puts the current filename into the CW<$ARGV> variable. It " "also uses the I<\\s-1ARGV\\s0> handle internally--EE is just a " "synonym for E\\s-1ARGV\\s0E, which is magic. (The above pseudocode " "doesn't work, because it treats \\s-1ARGV\\s0 as magic.)" msgstr "" "poza tym, że jest trochę ładniejsza i działa. Naprawdę przesuwa tablicę " "CW<@ARGV> i wstawia bieżącą nazwę pliku do zmiennej CW<$ARGV>. Używa też " "wewnętrznie uchwytu I<\\s-1ARGV\\s0>--EE jest po prostu synonimem " "E\\s-1ARGV\\s0E, który jest magiczny. (Powyższy pseudokod nie działa, " "gdyż traktuje \\s-1ARGV\\s0 amagicznie.)" #. type: Plain text #: perlop.1:1368 msgid "" "Przed pierwszym EE możesz modyfikować CW<@ARGV>, o ile tablica będzie " "zawierała listę plików, których oczekujesz. Numey linii (CW<$.>) są liczone " "tak, jakby wejście było tylko jednym, szczęśliwym plikiem. (Lecz zobacz " "przykład z I, aby zobaczyć jak zresetować numery linii.)" msgstr "" "Przed pierwszym EE możesz modyfikować CW<@ARGV>, o ile tablica będzie " "zawierała listę plików, których oczekujesz. Numey linii (CW<$.>) są liczone " "tak, jakby wejście było tylko jednym, szczęśliwym plikiem. (Lecz zobacz " "przykład z I, aby zobaczyć jak zresetować numery linii.)" #. type: Plain text #: perlop.1:1372 msgid "" "If you want to set CW<@ARGC> to your own list of files, that's fine. If you " "want to pass switches to your script, you can use one of the Getopts modules, " "or insert a loop like this at the beginning:" msgstr "" "Jeśli chcesz ustawić CW<@ARGC> na swoją własną listę plików, to nie ma " "sprawy. Jeśli chcesz przekazać do swojego skryptu przełączniki, możesz użyć " "jednego z modułów Getopts, lub wstawić na początku podobną pętlę:" #. type: Plain text #: perlop.1:1384 msgid "" "\\& while ($_ = $ARGV[0], /^-/) { \\& shift; \\& last if /^--$/; \\& if (/^-" "D(.*)/) { $debug = $1 } \\& if (/^-v/) { $verbose++ } \\& ... # other " "switches \\& } \\& while (EE) { \\& ... # code for each line \\& }" msgstr "" "\\& while ($_ = $ARGV[0], /^-/) { \\& shift; \\& last if /^--$/; \\& if (/^-" "D(.*)/) { $debug = $1 } \\& if (/^-v/) { $verbose++ } \\& ... # inne " "przełączniki \\& } \\& while (EE) { \\& ... # kod dla każdej linii " "\\& }" #. type: Plain text #: perlop.1:1388 msgid "" "The symbol EE returns \\s-1FALSE\\s0 only once. If you call it after " "that, it will assume you are processing a new CW<@ARGV> list, and if you " "haven't set one, it will take input from \\s-1STDIN\\s0." msgstr "" "Symbol EE zwraca \\s-1FALSE\\s0 tylko raz. Jesli wywołasz go po tym, " "założy, że przetwarzasz nową listę CW<@ARGV> i jeśli jej nie ustawiłeś, " "pobierze wejście ze \\s-1STDIN\\s0." #. type: Plain text #: perlop.1:1392 msgid "" "If the string inside the angle brackets is a pointer to a scalar variable " "(e.g. E$fooE), then that variable holds the name of the handle from " "which the input is taken. For example:" msgstr "" "Jeśli łańcuch wewnątrz nawiasów trójkątnych jest wskazaniem do zmiennej " "skalarnej (np. E$fooE), to zmienna ta przechowuje nazwę uchwytu, z " "którego pobierane jest wejście. Np:" #. type: Plain text #: perlop.1:1396 msgid "\\& $fh = \\e*STDIN; \\& $line = E$fhE;" msgstr "\\& $fh = \\e*STDIN; \\& $line = E$fhE;" #. type: Plain text #: perlop.1:1406 msgid "" "The string in angle brackets is not a filehandle, that is, it is interpreted " "as a filename pattern for glob()ing, and either a list of filenames or the " "next filename is returned (depending on context). First, one level of $ " "interpretation is done, but you can't say CW$fooE>, since that is " "an indirect filehandle, as described in the previous section. (In older " "versions of Perl, programmers could insert parentheses to force " "interpretation as a filename for globbing: CW${foo}E>. Today, " "however, it is considered cleaner to call the internal function directly -- " "CW. Example:" msgstr "" "Łańcuch w nawiasach trójkątnych nie jest uchwytem pliku, to jest " "interpretowany jako wzorzec nazwy pliku do glob()owania i zwracana jest albo " "lista nazw pliku lub następna nazwa pliku (zależnie od kontekstu). Najpierw " "dokonywany jest jeden poziom interpretacji $, lecz nie można powiedzieć " "CW$fooE>, gdyż jest to niebezpośredni uchwyt pliku, opisany w " "poprzednim paragrafie. (W starszych wersjach perla, programiści mogli " "wstawiać nawiasy do wymuszania interpretacji jako nazwy pliku do globowania: " "CW${foo}E>. Dziś jednak, za czystsze uważa się bezpośrednie wołanie " "funkcji wewnętrznej -- CW. Przykład:" #. type: Plain text #: perlop.1:1411 msgid "\\& while (E*.cE) { \\& chmod 0644, $_; \\& }" msgstr "\\& while (E*.cE) { \\& chmod 0644, $_; \\& }" #. type: Plain text #: perlop.1:1420 msgid "" "\\& open(FOO, \"echo *.c | tr -s ' \\et\\er\\ef' " "'\\e\\e012\\e\\e012\\e\\e012\\e\\e012'|\"); \\& while (EFOOE) { \\& " "chop; \\& chmod 0644, $_; \\& }" msgstr "" "\\& open(FOO, \"echo *.c | tr -s ' \\et\\er\\ef' " "'\\e\\e012\\e\\e012\\e\\e012\\e\\e012'|\"); \\& while (EFOOE) { \\& " "chop; \\& chmod 0644, $_; \\& }" #. type: Plain text #: perlop.1:1424 msgid "" "In fact, that's how it's currently implemented. (Which means it won't work on " "filenames with spaces, unless you have I(1) in place.) Of course, the " "shortest way to do the above is:" msgstr "" "W rzeczywistości, obecnie jest to właśnie tak zaimplementowane. (Co znaczy, " "że nie będzie działać na nazwach plików ze spacjami, chyba że masz u siebie " "I(1).) Oczywiście najkrótszym sposobem dokonania powyższego jest:" #. type: Plain text #: perlop.1:1427 msgid "\\& chmod 0644, E*.cE;" msgstr "\\& chmod 0644, E*.cE;" #. type: Plain text #: perlop.1:1433 msgid "" "Since globbing uses the shell, it is often faster to call I " "yourself and do I on the filenames. Furthermore, due to the current " "implementation, calling I may encounter errors like \\*(L\"Arg list " "too long\\*(R\" (unless you have installed B\\|(1L) as I)." msgstr "" "Ponieważ globowanie używa powłoki, często szybciej jest wywołać samodzielnie " "I i dokonać Ia na nazwach plików. Co więcej, z powodu " "obecnej implementacji, wywołanie I może napotkać błędy w rodzaju " "\\*(L\"Arg list too long\\*(R\" (chyba że zainstalowałeś B\\|(1L) jako " "I)." #. type: Plain text #: perlop.1:1441 msgid "" "The glob evaluates its (embedded) argument only if it starts a new list. All " "values ​​must be read before it starts again. In list context this is not " "important, since you automatically read all of them. However, in scalar " "context, the operator returns the next value after each call, or " "\\s-1FALSE\\s0 at the end. Again, \\s-1FALSE\\s0 is returned only once. So if " "you expect a single value from the glob, it is better to say" msgstr "" "Glob analizuje swój (osadzony) argument tylko jeśli rozpoczyna nową listę. " "Wszystkie wartości muszą być odczytane zanim znów rozpocznie. W kontekście " "listowym nie jest to istotne, gdyż autmatycznie odczytujesz wszystkie. " "Jednak w kontekście skalarnym, operator zwraca następną wartość za każdym " "wywołaniem, lub \\s-1FALSE\\s0 na końcu. Znowu, \\s-1FALSE\\s0 jest zwracane " "tylko raz. Jeśli więc oczekujesz od globa pojedynczej wartości, to lepiej " "powiedzieć" #. type: Plain text #: perlop.1:1444 msgid "\\& ($file) = Eblurch*E;" msgstr "\\& ($file) = Eblurch*E;" #. type: Plain text #: perlop.1:1446 msgid "and not" msgstr "a nie" #. type: Plain text #: perlop.1:1449 msgid "\\& $file = Eblurch*E;" msgstr "\\& $file = Eblurch*E;" #. type: Plain text #: perlop.1:1452 msgid "" "since the latter will distinguish between returning filenames and returning " "\\s-1FALSE\\s0." msgstr "" "gdyż to drugie będzie rozróżniać zwrócenie nazwy plików i zwrócenie " "\\s-1FALSE\\s0." #. type: Plain text #: perlop.1:1456 msgid "" "If you are trying to interpolate variables, it is definitely better to use " "the I function, as the older notation can cause confusion for some " "people." msgstr "" "Jeśli próbujesz dokonać interpolacji zmiennych, to zdecydowanie lepiej jest " "użyć funkcji I, gdyż starsza notacja może spowodować zakłopotanie u " "niektórych osób." #. type: Plain text #: perlop.1:1460 msgid "\\& @files = glob(\"$dir/*.[ch]\"); \\& @files = glob($files[$i]);" msgstr "\\& @files = glob(\"$dir/*.[ch]\"); \\& @files = glob($files[$i]);" #. type: IX #: perlop.1:1462 #, no-wrap msgid "Constant Folding" msgstr "" #. type: Plain text #: perlop.1:1469 msgid "" "Like C, Perl has a set of expression evaluations that are performed at " "compile time -- this happens if it notices that all the arguments to an " "operator are static and have no side effects. In particular, literal " "concatenation without variable substitution is performed at compile time. " "Backslash interpretation also occurs at compile time. You can say" msgstr "" "Podobnie jak C, perl posiada pewien zestaw analiz wyrażeń, wykonywanych " "podczas kompilacji -- dzieje się to jeśli zauważy, że wszystkie argumenty " "operatora są statyczne i nie mają efektów ubocznych. W szczególności, np. " "konkatenacja literałów bez podstawień zmiennych jest dokonywana podczas " "kompilacji. Interpretacja odwrotnych ukośników następuje również podczas " "kompilacji. Możesz powiedzieć" #. type: Plain text #: perlop.1:1473 msgid "\\& 'Now is the time for all' . \"\\en\" . \\& 'good men to come to.'" msgstr "\\& 'Now is the time for all' . \"\\en\" . \\& 'good men to come to.'" #. type: Plain text #: perlop.1:1476 msgid "and all this internally reduces to one string. Similarly, if you say" msgstr "" "a wszystko to wewnętrznie zredukuje się do jednego łańcucha. Podobnie, jeśli " "powiesz" #. type: Plain text #: perlop.1:1481 msgid "" "\\& foreach $file (@filenames) { \\& if (-s $file E 5 + 100 * 2**16) " "{ ... } \\& }" msgstr "" "\\& foreach $file (@filenames) { \\& if (-s $file E 5 + 100 * 2**16) " "{ ... } \\& }" #. type: Plain text #: perlop.1:1483 msgid "the compiler will calculate the numbers that the expression represents." msgstr "to kompilator przeliczy liczby, które reprezentuje wyrażenie." #. type: IX #: perlop.1:1484 #, no-wrap msgid "Integer Arithmetic" msgstr "" #. type: Plain text #: perlop.1:1487 msgid "" "By default, Perl does all of its calculations in floating point. However, the " "saying" msgstr "" "Domyślnie, perl wykonuje wszystkie obliczenia zmiennoprzecinkowo. Jednak " "powiedzenie" #. type: Plain text #: perlop.1:1490 msgid "\\& use integer;" msgstr "\\& use integer;" #. type: Plain text #: perlop.1:1493 msgid "" "tells the compiler that it can use from now on until the end of the integer " "block. The inner blocks can deny this by saying" msgstr "" "mówi kompilatorowi, że może używać odtąd, do końca bloku operacji " "całkowitych. Wewnętrzne bloki mogą temu zaprzeczyć, mówiąc" #. type: Plain text #: perlop.1:1496 msgid "\\& no integer;" msgstr "\\& no integer;" #. type: Plain text #: perlop.1:1498 msgid "which is enough for the rest of their block." msgstr "co wystarcza do końca ich bloku." #. type: Plain text #: perlop.1:1505 msgid "" "The bitwise operators (\"&\\*(R\", \\*(L\"|\\*(R\", \\*(L\"^\\*(R\", " "\\*(L\"~\\*(R\", \\*(L\"EE\\*(R\", and \\*(L\"EE\") always " "produce integer results. However, CW still has meaning for them. " "By default, their results are interpreted as unsigned integers. When this " "option is turned on, they are interpreted with a sign. For example, CW<~0> " "normally evaluates to a large integer value. After CW it " "becomes -1." msgstr "" "Operatory bitowe (\"&\\*(R\", \\*(L\"|\\*(R\", \\*(L\"^\\*(R\", " "\\*(L\"~\\*(R\", \\*(L\"EE\\*(R\", i \\*(L\"EE\") zawsze dają " "wyniki całkowite. Jednak CW ma wciąż dla nich znaczenie. " "Domyślnie ich wyniki są interpretowane jako liczby całkowite bez znaku. Po " "włączeniu tej opcji, sa interpretowane ze znakiem. Np. CW<~0> normalnie jest " "analizowane do wielkiej wartości całkowitej. Po CW staje " "się -1." #. type: IX #: perlop.1:1506 #, no-wrap msgid "Floating-point Arithmetic" msgstr "" #. type: Plain text #: perlop.1:1511 msgid "" "While CW gives integer arithmetic, there is no similar " "instruction for giving rounding, or cutting off at specific decimal places. " "For rounding to a specific number of digits, it is best to use or " "I." msgstr "" "Podczas gdy CW daje arytmetykę całkowitą, nie ma podobnej " "instrukcji dla dawania zaokrągleń, lub odcięć w konkretnych miejscach " "dziesiętnych. Dla zaokrągleń do określonej ilości cyfr, najlepiej użyć " "I lub I." #. type: Plain text #: perlop.1:1519 msgid "" "The \\s-1POSIX\\s0 module (part of the standard Perl distribution) implements " "the I, I, and several other mathematical and trigonometric " "functions. The Math::Complex module (also standard) defines a number of " "mathematical functions that can also operate on real numbers. The " "Math::Complex module is not as efficient as \\s-1POSIX\\s0, but " "\\s-1POSIX\\s0 cannot operate on complex numbers." msgstr "" "Moduł \\s-1POSIX\\s0 (część standardowej dystrybucji perla) implementuje " "funkcje I, I i kilka innych funkcji matematycznych i " "trygonometrycznych. Moduł Math::Complex (również standardowy) definiuje sporo " "funkcji matematycznych, które mogą działać również na liczbach rzeczywistych. " "Moduł Math::Complex nie jest tak wydajny jak \\s-1POSIX\\s0, lecz " "\\s-1POSIX\\s0 nie może działać na liczbach zespolonych." #. type: Plain text #: perlop.1:1524 msgid "" "Rounding in financial applications can have serious consequences and the " "method used should be specified exactly. In these cases, it is better not to " "trust which rounding system is used by Perl, but to implement such a function " "yourself." msgstr "" "Zaokrąglanie w aplikacjach finansowych może mieć poważne konsekwencje i " "używana metoda powinna być podawana dokładnie. W tych wypadkach, lepiej nie " "ufać temu, który system zaokrąglania jest używany przez perla, lecz " "zaimplementować taką funkcję samodzielnie."