| 1 |
# Polish translation of manpages |
| 2 |
# This file is distributed under the same license as the manpages-l10n package. |
| 3 |
# Copyright © of this file: |
| 4 |
# Przemek Borys <[email protected]>, 1999. |
| 5 |
# Wojtek Kotwica <[email protected]>, 1999-2000. |
| 6 |
# Robert Luberda <[email protected]>, 2002. |
| 7 |
msgid "" |
| 8 |
msgstr "" |
| 9 |
"Project-Id-Version: manpages-l10n\n" |
| 10 |
"POT-Creation-Date: 2026-06-05 06:34+0200\n" |
| 11 |
"PO-Revision-Date: 2002-08-22 22:21+0200\n" |
| 12 |
"Last-Translator: Robert Luberda <[email protected]>\n" |
| 13 |
"Language-Team: Polish <[email protected]>\n" |
| 14 |
"Language: pl\n" |
| 15 |
"MIME-Version: 1.0\n" |
| 16 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 17 |
"Content-Transfer-Encoding: 8bit\n" |
| 18 |
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " |
| 19 |
"|| n%100>=20) ? 1 : 2);\n" |
| 20 |
|
| 21 |
#. #-#-#-#-# debian-trixie: perlsyn.1.pot (PACKAGE VERSION) #-#-#-#-# |
| 22 |
#. ======================================================================== |
| 23 |
#. type: IX |
| 24 |
#. #-#-#-#-# debian-unstable: perlsyn.1.pot (PACKAGE VERSION) #-#-#-#-# |
| 25 |
#. ======================================================================== |
| 26 |
#. type: IX |
| 27 |
#. #-#-#-#-# fedora-44: perlsyn.1.pot (PACKAGE VERSION) #-#-#-#-# |
| 28 |
#. Required to disable full justification in groff 1.23.0. |
| 29 |
#. ======================================================================== |
| 30 |
#. type: IX |
| 31 |
#. #-#-#-#-# fedora-rawhide: perlsyn.1.pot (PACKAGE VERSION) #-#-#-#-# |
| 32 |
#. Required to disable full justification in groff 1.23.0. |
| 33 |
#. ======================================================================== |
| 34 |
#. type: IX |
| 35 |
#. #-#-#-#-# mageia-cauldron: perlsyn.1.pot (PACKAGE VERSION) #-#-#-#-# |
| 36 |
#. Required to disable full justification in groff 1.23.0. |
| 37 |
#. ======================================================================== |
| 38 |
#. type: IX |
| 39 |
#. #-#-#-#-# opensuse-leap-16-1: perlsyn.1.pot (PACKAGE VERSION) #-#-#-#-# |
| 40 |
#. Required to disable full justification in groff 1.23.0. |
| 41 |
#. ======================================================================== |
| 42 |
#. type: IX |
| 43 |
#. #-#-#-#-# opensuse-tumbleweed: perlsyn.1.pot (PACKAGE VERSION) #-#-#-#-# |
| 44 |
#. Required to disable full justification in groff 1.23.0. |
| 45 |
#. ======================================================================== |
| 46 |
#. type: IX |
| 47 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 48 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 49 |
#, no-wrap |
| 50 |
msgid "Title" |
| 51 |
msgstr "Title" |
| 52 |
|
| 53 |
#. #-#-#-#-# debian-trixie: perlsyn.1.pot (PACKAGE VERSION) #-#-#-#-# |
| 54 |
#. ======================================================================== |
| 55 |
#. type: IX |
| 56 |
#. #-#-#-#-# debian-unstable: perlsyn.1.pot (PACKAGE VERSION) #-#-#-#-# |
| 57 |
#. ======================================================================== |
| 58 |
#. type: IX |
| 59 |
#. #-#-#-#-# fedora-44: perlsyn.1.pot (PACKAGE VERSION) #-#-#-#-# |
| 60 |
#. Required to disable full justification in groff 1.23.0. |
| 61 |
#. ======================================================================== |
| 62 |
#. type: IX |
| 63 |
#. #-#-#-#-# fedora-rawhide: perlsyn.1.pot (PACKAGE VERSION) #-#-#-#-# |
| 64 |
#. Required to disable full justification in groff 1.23.0. |
| 65 |
#. ======================================================================== |
| 66 |
#. type: IX |
| 67 |
#. #-#-#-#-# mageia-cauldron: perlsyn.1.pot (PACKAGE VERSION) #-#-#-#-# |
| 68 |
#. Required to disable full justification in groff 1.23.0. |
| 69 |
#. ======================================================================== |
| 70 |
#. type: IX |
| 71 |
#. #-#-#-#-# opensuse-leap-16-1: perlsyn.1.pot (PACKAGE VERSION) #-#-#-#-# |
| 72 |
#. Required to disable full justification in groff 1.23.0. |
| 73 |
#. ======================================================================== |
| 74 |
#. type: IX |
| 75 |
#. #-#-#-#-# opensuse-tumbleweed: perlsyn.1.pot (PACKAGE VERSION) #-#-#-#-# |
| 76 |
#. Required to disable full justification in groff 1.23.0. |
| 77 |
#. ======================================================================== |
| 78 |
#. type: IX |
| 79 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 80 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 81 |
#, no-wrap |
| 82 |
msgid "PERLSYN 1" |
| 83 |
msgstr "PERLSYN 1" |
| 84 |
|
| 85 |
#. type: TH |
| 86 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 87 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 88 |
#, no-wrap |
| 89 |
msgid "PERLSYN" |
| 90 |
msgstr "PERLSYN" |
| 91 |
|
| 92 |
#. type: TH |
| 93 |
#: debian-trixie |
| 94 |
#, no-wrap |
| 95 |
msgid "2025-07-27" |
| 96 |
msgstr "27 lipca 2025 r." |
| 97 |
|
| 98 |
#. type: TH |
| 99 |
#: debian-trixie debian-unstable |
| 100 |
#, no-wrap |
| 101 |
msgid "perl v5.40.1" |
| 102 |
msgstr "perl v5.40.1" |
| 103 |
|
| 104 |
#. type: TH |
| 105 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 106 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 107 |
#, no-wrap |
| 108 |
msgid "Perl Programmers Reference Guide" |
| 109 |
msgstr "Instrukcja programisty Perla" |
| 110 |
|
| 111 |
#. type: SH |
| 112 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 113 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 114 |
#, no-wrap |
| 115 |
msgid "NAME" |
| 116 |
msgstr "NAZWA" |
| 117 |
|
| 118 |
#. type: Plain text |
| 119 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 120 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 121 |
msgid "perlsyn - Perl syntax: declarations, statements, comments" |
| 122 |
msgstr "" |
| 123 |
|
| 124 |
#. type: IX |
| 125 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 126 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 127 |
#, no-wrap |
| 128 |
msgid "Xref" |
| 129 |
msgstr "Xref" |
| 130 |
|
| 131 |
#. type: IX |
| 132 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 133 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 134 |
#, fuzzy, no-wrap |
| 135 |
#| msgid "Syntax" |
| 136 |
msgid "syntax" |
| 137 |
msgstr "Składnia" |
| 138 |
|
| 139 |
#. type: IX |
| 140 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 141 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 142 |
#, no-wrap |
| 143 |
msgid "DESCRIPTION" |
| 144 |
msgstr "OPIS" |
| 145 |
|
| 146 |
#. type: IX |
| 147 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 148 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 149 |
#, no-wrap |
| 150 |
msgid "Header" |
| 151 |
msgstr "Header" |
| 152 |
|
| 153 |
#. type: Plain text |
| 154 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 155 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 156 |
msgid "" |
| 157 |
"A Perl program consists of a sequence of declarations and statements which " |
| 158 |
"run from the top to the bottom. Loops, subroutines, and other control " |
| 159 |
"structures allow you to jump around within the code." |
| 160 |
msgstr "" |
| 161 |
|
| 162 |
#. type: Plain text |
| 163 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 164 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 165 |
msgid "" |
| 166 |
"Perl is a B<free-form> language: you can format and indent it however you " |
| 167 |
"like. Whitespace serves mostly to separate tokens, unlike languages like " |
| 168 |
"Python where it is an important part of the syntax, or Fortran where it is " |
| 169 |
"immaterial." |
| 170 |
msgstr "" |
| 171 |
|
| 172 |
#. type: Plain text |
| 173 |
#: debian-trixie debian-unstable |
| 174 |
msgid "" |
| 175 |
"Many of Perl's syntactic elements are B<optional>. Rather than requiring " |
| 176 |
"you to put parentheses around every function call and declare every " |
| 177 |
"variable, you can often leave such explicit elements off and Perl will " |
| 178 |
"figure out what you meant. This is known as B<Do What I Mean>, abbreviated " |
| 179 |
"B<DWIM>. It allows programmers to be B<lazy> and to code in a style with " |
| 180 |
"which they are comfortable." |
| 181 |
msgstr "" |
| 182 |
|
| 183 |
#. type: Plain text |
| 184 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 185 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 186 |
msgid "" |
| 187 |
"Perl B<borrows syntax> and concepts from many languages: awk, sed, C, Bourne " |
| 188 |
"Shell, Smalltalk, Lisp and even English. Other languages have borrowed " |
| 189 |
"syntax from Perl, particularly its regular expression extensions. So if you " |
| 190 |
"have programmed in another language you will see familiar pieces in Perl. " |
| 191 |
"They often work the same, but see perltrap for information about how they " |
| 192 |
"differ." |
| 193 |
msgstr "" |
| 194 |
|
| 195 |
#. type: IX |
| 196 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 197 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 198 |
#, no-wrap |
| 199 |
msgid "Declarations" |
| 200 |
msgstr "Deklaracje" |
| 201 |
|
| 202 |
#. type: IX |
| 203 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 204 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 205 |
#, no-wrap |
| 206 |
msgid "declaration undef undefined uninitialized" |
| 207 |
msgstr "" |
| 208 |
|
| 209 |
#. type: IX |
| 210 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 211 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 212 |
#, no-wrap |
| 213 |
msgid "Subsection" |
| 214 |
msgstr "Subsection" |
| 215 |
|
| 216 |
#. type: Plain text |
| 217 |
#: debian-trixie debian-unstable |
| 218 |
msgid "" |
| 219 |
"The only things you need to declare in Perl are report formats and " |
| 220 |
"subroutines (and sometimes not even subroutines). A scalar variable holds " |
| 221 |
"the undefined value (CW<\\*(C`undef\\*(C'>) until it has been assigned a " |
| 222 |
"defined value, which is anything other than CW<\\*(C`undef\\*(C'>. When " |
| 223 |
"used as a number, \\&CW<\\*(C`undef\\*(C'> is treated as CW<0>; when used as " |
| 224 |
"a string, it is treated as the empty string, CW<\"\">; and when used as a " |
| 225 |
"reference that isn't being assigned to, it is treated as an error. If you " |
| 226 |
"enable warnings, you'll be notified of an uninitialized value whenever you " |
| 227 |
"treat \\&CW<\\*(C`undef\\*(C'> as a string or a number. Well, usually. " |
| 228 |
"Boolean contexts, such as:" |
| 229 |
msgstr "" |
| 230 |
|
| 231 |
#. type: Plain text |
| 232 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 233 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 234 |
#, no-wrap |
| 235 |
msgid "\\& if ($x) {}\n" |
| 236 |
msgstr "\\& if ($x) {}\n" |
| 237 |
|
| 238 |
#. type: Plain text |
| 239 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 240 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 241 |
msgid "" |
| 242 |
"are exempt from warnings (because they care about truth rather than " |
| 243 |
"definedness). Operators such as CW<\\*(C`++\\*(C'>, CW<\\*(C`--\\*(C'>, " |
| 244 |
"CW<\\*(C`+=\\*(C'>, \\&CW<\\*(C`-=\\*(C'>, and CW<\\*(C`.=\\*(C'>, that " |
| 245 |
"operate on undefined variables such as:" |
| 246 |
msgstr "" |
| 247 |
|
| 248 |
#. type: Plain text |
| 249 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 250 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 251 |
#, no-wrap |
| 252 |
msgid "" |
| 253 |
"\\& undef $x;\n" |
| 254 |
"\\& $x++;\n" |
| 255 |
msgstr "" |
| 256 |
"\\& undef $x;\n" |
| 257 |
"\\& $x++;\n" |
| 258 |
|
| 259 |
#. type: Plain text |
| 260 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 261 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 262 |
msgid "are also always exempt from such warnings." |
| 263 |
msgstr "" |
| 264 |
|
| 265 |
#. type: Plain text |
| 266 |
#: debian-trixie debian-unstable |
| 267 |
#, fuzzy |
| 268 |
#| msgid "" |
| 269 |
#| "The declaration can be inserted anywhere a statement can be inserted, but " |
| 270 |
#| "it has no effect on the execution of the underlying sequence of " |
| 271 |
#| "statements\\*(--declarations only have meaning during compilation. " |
| 272 |
#| "Typically all declarations are inserted at the beginning or end of a " |
| 273 |
#| "script. However, if you use lexically scoped private variables created by " |
| 274 |
#| "I<my()>, you will need to make sure that your form or procedure " |
| 275 |
#| "definition using the declarations is within the same scope." |
| 276 |
msgid "" |
| 277 |
"A declaration can be put anywhere a statement can, but has no effect on the " |
| 278 |
"execution of the primary sequence of statements: declarations all take " |
| 279 |
"effect at compile time. All declarations are typically put at the beginning " |
| 280 |
"or the end of the script. However, if you're using lexically-scoped private " |
| 281 |
"variables created with CW<my()>, \\&CW<state()>, or CW<our()>, you'll have " |
| 282 |
"to make sure your format or subroutine definition is within the same block " |
| 283 |
"scope as the my if you expect to be able to access those private variables." |
| 284 |
msgstr "" |
| 285 |
"Deklaracja może być wstawiona gdziekolwiek, gdzie można wstawić instrukcję, " |
| 286 |
"lecz nie ma wpływu na wykonywanie podstawowej sekwencji instrukcji\\*(--" |
| 287 |
"deklaracje mają znaczenie tylko podczas kompilacji. Zazwyczaj wszystkie " |
| 288 |
"deklaracje wstawiane są na początku lub na końcu skryptu. Jeśli jednak " |
| 289 |
"używasz zmiennych prywatnych zawężonych leksykalnie, utworzonych przez " |
| 290 |
"I<my()>, będziesz musiał się upewnić, czy twoja definicja formatki lub " |
| 291 |
"procedury, używającej tych deklaracji leży wewnątrz tego samego zakresu." |
| 292 |
|
| 293 |
#. type: Plain text |
| 294 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 295 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 296 |
#, fuzzy |
| 297 |
#| msgid "" |
| 298 |
#| "Declaring a procedure allows its name to be used as if it were a list " |
| 299 |
#| "operator from that point on until the end of the program. You can declare " |
| 300 |
#| "a procedure without defining it by writing CW<sub name>, so:" |
| 301 |
msgid "" |
| 302 |
"Declaring a subroutine allows a subroutine name to be used as if it were a " |
| 303 |
"list operator from that point forward in the program. You can declare a " |
| 304 |
"subroutine without defining it by saying CW<\\*(C`sub name\\*(C'>, thus:" |
| 305 |
msgstr "" |
| 306 |
"Deklarowanie procedury zezwala na używanie jej nazwy tak, jakby była " |
| 307 |
"operatorem listowym, licząc od tego miejsca, aż do końca programu. Możesz " |
| 308 |
"zadeklarować procedurę bez jej definiowania, pisząc CW<sub name>, więc:" |
| 309 |
|
| 310 |
#. type: IX |
| 311 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 312 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 313 |
#, no-wrap |
| 314 |
msgid "subroutine, declaration" |
| 315 |
msgstr "" |
| 316 |
|
| 317 |
#. type: Plain text |
| 318 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 319 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 320 |
#, no-wrap |
| 321 |
msgid "" |
| 322 |
"\\& sub myname;\n" |
| 323 |
"\\& $me = myname $0 or die \"can\\*(Aqt get myname\";\n" |
| 324 |
msgstr "" |
| 325 |
"\\& sub myname;\n" |
| 326 |
"\\& $me = myname $0 or die \"can\\*(Aqt get myname\";\n" |
| 327 |
|
| 328 |
#. type: Plain text |
| 329 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 330 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 331 |
msgid "" |
| 332 |
"A bare declaration like that declares the function to be a list operator, " |
| 333 |
"not a unary operator, so you have to be careful to use parentheses (or " |
| 334 |
"\\&CW<\\*(C`or\\*(C'> instead of CW<\\*(C`||\\*(C'>.) The CW<\\*(C`||" |
| 335 |
"\\*(C'> operator binds too tightly to use after list operators; it becomes " |
| 336 |
"part of the last element. You can always use parentheses around the list " |
| 337 |
"operators arguments to turn the list operator back into something that " |
| 338 |
"behaves more like a function call. Alternatively, you can use the prototype " |
| 339 |
"CW<\\*(C`($)\\*(C'> to turn the subroutine into a unary operator:" |
| 340 |
msgstr "" |
| 341 |
|
| 342 |
#. type: Plain text |
| 343 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 344 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 345 |
#, no-wrap |
| 346 |
msgid "" |
| 347 |
"\\& sub myname ($);\n" |
| 348 |
"\\& $me = myname $0 || die \"can\\*(Aqt get myname\";\n" |
| 349 |
msgstr "" |
| 350 |
"\\& sub myname ($);\n" |
| 351 |
"\\& $me = myname $0 || die \"can\\*(Aqt get myname\";\n" |
| 352 |
|
| 353 |
#. type: Plain text |
| 354 |
#: debian-trixie debian-unstable |
| 355 |
msgid "" |
| 356 |
"That now parses as you'd expect, but you still ought to get in the habit of " |
| 357 |
"using parentheses in that situation. For more on prototypes, see perlsub." |
| 358 |
msgstr "" |
| 359 |
|
| 360 |
#. type: Plain text |
| 361 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 362 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 363 |
#, fuzzy |
| 364 |
#| msgid "" |
| 365 |
#| "Procedure declarations can also be loaded with the CW<require> statement, " |
| 366 |
#| "or both loaded and imported into the namespace with the CW<use> " |
| 367 |
#| "statement. For details, I recommend the B<perlmod>(1) manual." |
| 368 |
msgid "" |
| 369 |
"Subroutines declarations can also be loaded up with the " |
| 370 |
"CW<\\*(C`require\\*(C'> statement or both loaded and imported into your " |
| 371 |
"namespace with a CW<\\*(C`use\\*(C'> statement. See perlmod for details on " |
| 372 |
"this." |
| 373 |
msgstr "" |
| 374 |
"Deklaracje procedur mogą być również ładowane instrukcją CW<require>, lub " |
| 375 |
"jednocześnie ładowane jak i importowane do przestrzeni nazw dzięki " |
| 376 |
"instrukcji CW<use>. Dla szczegółów polecam podręcznik B<perlmod>(1)." |
| 377 |
|
| 378 |
#. type: Plain text |
| 379 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 380 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 381 |
#, fuzzy |
| 382 |
#| msgid "" |
| 383 |
#| "The statement sequence may contain declarations of lexically scoped " |
| 384 |
#| "variables, but apart from declaring the variable name, the declaration " |
| 385 |
#| "acts as an ordinary statement and is executed in the statement sequence " |
| 386 |
#| "as an ordinary statement. That is, it has both compile-time and run-time " |
| 387 |
#| "effects." |
| 388 |
msgid "" |
| 389 |
"A statement sequence may contain declarations of lexically-scoped variables, " |
| 390 |
"but apart from declaring a variable name, the declaration acts like an " |
| 391 |
"ordinary statement, and is elaborated within the sequence of statements as " |
| 392 |
"if it were an ordinary statement. That means it actually has both compile-" |
| 393 |
"time and run-time effects." |
| 394 |
msgstr "" |
| 395 |
"Sekwencja instrukcji może zawierać deklaracje zmiennych zawężonych " |
| 396 |
"leksykalnie, lecz poza deklarowaniem nazwy zmiennej, deklaracja działa jak " |
| 397 |
"zwykła instrukcja i jest wykonywana w sekwencji instrukcji jak zwyczajna " |
| 398 |
"instrukcja. Znaczy to, że ma ona zarówno skutki podczas kompilacji, jak w " |
| 399 |
"czasie działania." |
| 400 |
|
| 401 |
#. type: IX |
| 402 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 403 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 404 |
#, no-wrap |
| 405 |
msgid "Comments" |
| 406 |
msgstr "Komentarze" |
| 407 |
|
| 408 |
#. type: IX |
| 409 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 410 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 411 |
#, fuzzy, no-wrap |
| 412 |
#| msgid "B<comment>" |
| 413 |
msgid "comment #" |
| 414 |
msgstr "B<comment>" |
| 415 |
|
| 416 |
#. type: Plain text |
| 417 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 418 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 419 |
msgid "" |
| 420 |
"Text from a CW<\"#\"> character until the end of the line is a comment, and " |
| 421 |
"is ignored. Exceptions include CW<\"#\"> inside a string or regular " |
| 422 |
"expression." |
| 423 |
msgstr "" |
| 424 |
|
| 425 |
#. type: IX |
| 426 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 427 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 428 |
#, fuzzy, no-wrap |
| 429 |
#| msgid "Simple instructions" |
| 430 |
msgid "Simple Statements" |
| 431 |
msgstr "Instrukcje proste" |
| 432 |
|
| 433 |
#. type: IX |
| 434 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 435 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 436 |
#, no-wrap |
| 437 |
msgid "statement semicolon expression ;" |
| 438 |
msgstr "" |
| 439 |
|
| 440 |
#. type: Plain text |
| 441 |
#: debian-trixie debian-unstable |
| 442 |
#, fuzzy |
| 443 |
#| msgid "" |
| 444 |
#| "The only kind of simple statement is an expression, evaluated for its " |
| 445 |
#| "side effects. Each simple statement must end with a semicolon, unless it " |
| 446 |
#| "is the last statement of a block, in which case the semicolon is not " |
| 447 |
#| "required. (However, it is still recommended if the block spans more than " |
| 448 |
#| "one line, since you may add more lines.) Note that there are operators " |
| 449 |
#| "such as CW<eval {}> and CW<do {}> that look like compound statements, but " |
| 450 |
#| "are not, and require an explicit termination if used as the last element " |
| 451 |
#| "of a statement." |
| 452 |
msgid "" |
| 453 |
"The only kind of simple statement is an expression evaluated for its side-" |
| 454 |
"effects. Every simple statement must be terminated with a semicolon, unless " |
| 455 |
"it is the final statement in a block, in which case the semicolon is " |
| 456 |
"optional. But put the semicolon in anyway if the block takes up more than " |
| 457 |
"one line, because you may eventually add another line. Note that there are " |
| 458 |
"operators like CW<\\*(C`eval {}\\*(C'>, CW<\\*(C`sub {}\\*(C'>, and " |
| 459 |
"\\&CW<\\*(C`do {}\\*(C'> that I<look> like compound statements, but aren't--" |
| 460 |
"they're just TERMs in an expression--and thus need an explicit termination " |
| 461 |
"when used as the last item in a statement." |
| 462 |
msgstr "" |
| 463 |
"Jedynym rodzajem instrukcji prostej jest wyrażenie, analizowane dla swoich " |
| 464 |
"efektów ubocznych. Każda instrukcja prosta musi się kończyć średnikiem, " |
| 465 |
"chyba że jest ostatnią instrukcją bloku, wtedy średnik nie jest " |
| 466 |
"obowiązujący. (Jednak wciąż jest zalecany jeśli blok zajmuje więcej niż " |
| 467 |
"jedną linię, gdyż możliwe że dodasz jeszcze kolejne linie.) Zauważ, że " |
| 468 |
"istnieją operatory takie, jak CW<eval {}> i CW<do {}>, które wyglądają jak " |
| 469 |
"instrukcje złożone, lecz nimi nie są i wymagają jawnego zakończenia jeśli są " |
| 470 |
"użyte jako ostatni element instrukcji." |
| 471 |
|
| 472 |
#. type: IX |
| 473 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 474 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 475 |
#, fuzzy, no-wrap |
| 476 |
#| msgid "Modifiers" |
| 477 |
msgid "Statement Modifiers" |
| 478 |
msgstr "Modyfikatory" |
| 479 |
|
| 480 |
#. type: IX |
| 481 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 482 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 483 |
#, no-wrap |
| 484 |
msgid "statement modifier modifier if unless while until when foreach for" |
| 485 |
msgstr "" |
| 486 |
|
| 487 |
#. type: Plain text |
| 488 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 489 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 490 |
msgid "" |
| 491 |
"Any simple statement may optionally be followed by a I<SINGLE> modifier, " |
| 492 |
"just before the terminating semicolon (or block ending). The possible " |
| 493 |
"modifiers are:" |
| 494 |
msgstr "" |
| 495 |
|
| 496 |
#. type: Plain text |
| 497 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 498 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 499 |
#, no-wrap |
| 500 |
msgid "" |
| 501 |
"\\& if EXPR\n" |
| 502 |
"\\& unless EXPR\n" |
| 503 |
"\\& while EXPR\n" |
| 504 |
"\\& until EXPR\n" |
| 505 |
"\\& for LIST\n" |
| 506 |
"\\& foreach LIST\n" |
| 507 |
"\\& when EXPR\n" |
| 508 |
msgstr "" |
| 509 |
|
| 510 |
#. type: Plain text |
| 511 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 512 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 513 |
msgid "" |
| 514 |
"The CW<\\*(C`EXPR\\*(C'> following the modifier is referred to as the " |
| 515 |
"\"condition\". Its truth or falsehood determines how the modifier will " |
| 516 |
"behave." |
| 517 |
msgstr "" |
| 518 |
|
| 519 |
#. type: Plain text |
| 520 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 521 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 522 |
msgid "" |
| 523 |
"\\&CW<\\*(C`if\\*(C'> executes the statement once I<if> and only if the " |
| 524 |
"condition is true. CW<\\*(C`unless\\*(C'> is the opposite, it executes the " |
| 525 |
"statement I<unless> the condition is true (that is, if the condition is " |
| 526 |
"false). See \"Scalar values\" in perldata for definitions of true and false." |
| 527 |
msgstr "" |
| 528 |
|
| 529 |
#. type: Plain text |
| 530 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 531 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 532 |
#, no-wrap |
| 533 |
msgid "" |
| 534 |
"\\& print \"Basset hounds got long ears\" if length $ear E<gt>= 10;\n" |
| 535 |
"\\& go_outside() and play() unless $is_raining;\n" |
| 536 |
msgstr "" |
| 537 |
|
| 538 |
#. type: Plain text |
| 539 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 540 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 541 |
msgid "" |
| 542 |
"The CW<for(each)> modifier is an iterator: it executes the statement once " |
| 543 |
"for each item in the LIST (with CW<$_> aliased to each item in turn). There " |
| 544 |
"is no syntax to specify a C-style for loop or a lexically scoped iteration " |
| 545 |
"variable in this form." |
| 546 |
msgstr "" |
| 547 |
|
| 548 |
#. type: Plain text |
| 549 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 550 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 551 |
#, no-wrap |
| 552 |
msgid "\\& print \"Hello $_!\\en\" for qw(world Dolly nurse);\n" |
| 553 |
msgstr "" |
| 554 |
|
| 555 |
#. type: Plain text |
| 556 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 557 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 558 |
msgid "" |
| 559 |
"\\&CW<\\*(C`while\\*(C'> repeats the statement I<while> the condition is " |
| 560 |
"true. Postfix CW<\\*(C`while\\*(C'> has the same magic treatment of some " |
| 561 |
"kinds of condition that prefix CW<\\*(C`while\\*(C'> has. " |
| 562 |
"\\&CW<\\*(C`until\\*(C'> does the opposite, it repeats the statement " |
| 563 |
"I<until> the condition is true (or while the condition is false):" |
| 564 |
msgstr "" |
| 565 |
|
| 566 |
#. type: Plain text |
| 567 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 568 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 569 |
#, no-wrap |
| 570 |
msgid "" |
| 571 |
"\\& # Both of these count from 0 to 10.\n" |
| 572 |
"\\& print $i++ while $i E<lt>= 10;\n" |
| 573 |
"\\& print $j++ until $j E<gt> 10;\n" |
| 574 |
msgstr "" |
| 575 |
|
| 576 |
#. type: Plain text |
| 577 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 578 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 579 |
msgid "" |
| 580 |
"The CW<\\*(C`while\\*(C'> and CW<\\*(C`until\\*(C'> modifiers have the usual " |
| 581 |
"\"CW<\\*(C`while\\*(C'> loop\" semantics (conditional evaluated first), " |
| 582 |
"except when applied to a \\&CW<\\*(C`do\\*(C'>-BLOCK (or to the Perl4 " |
| 583 |
"CW<\\*(C`do\\*(C'>-SUBROUTINE statement), in which case the block executes " |
| 584 |
"once before the conditional is evaluated." |
| 585 |
msgstr "" |
| 586 |
|
| 587 |
#. type: Plain text |
| 588 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 589 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 590 |
msgid "This is so that you can write loops like:" |
| 591 |
msgstr "" |
| 592 |
|
| 593 |
#. type: Plain text |
| 594 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 595 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 596 |
#, fuzzy, no-wrap |
| 597 |
#| msgid "\\& do { \\& $line = E<lt>STDINE<gt>; \\& ... \\& } until $line eq \".\\en\";" |
| 598 |
msgid "" |
| 599 |
"\\& do {\n" |
| 600 |
"\\& $line = E<lt>STDINE<gt>;\n" |
| 601 |
"\\& ...\n" |
| 602 |
"\\& } until !defined($line) || $line eq \".\\en\"\n" |
| 603 |
msgstr "\\& do { \\& $line = E<lt>STDINE<gt>; \\& ... \\& } until $line eq \".\\en\";" |
| 604 |
|
| 605 |
#. type: Plain text |
| 606 |
#: debian-trixie debian-unstable |
| 607 |
#, fuzzy |
| 608 |
#| msgid "" |
| 609 |
#| "See the description of CW<do> in the B<perlfunc>(1) manual. Also note " |
| 610 |
#| "that the loop control statements I<\\s-1NOT\\s0> described below will " |
| 611 |
#| "work in this construct, since the modifiers don't take loop labels. " |
| 612 |
#| "Sorry. You can always put another block inside (for CW<next>) or put your " |
| 613 |
#| "statement inside a block (for CW<last>) to do something like that. In the " |
| 614 |
#| "case of CW<next>, just double the parentheses:" |
| 615 |
msgid "" |
| 616 |
"See \"do\" in perlfunc. Note also that the loop control statements " |
| 617 |
"described later will I<NOT> work in this construct, because modifiers don't " |
| 618 |
"take loop labels. Sorry. You can always put another block inside of it " |
| 619 |
"(for CW<\\*(C`next\\*(C'>/CW<\\*(C`redo\\*(C'>) or around it (for " |
| 620 |
"CW<\\*(C`last\\*(C'>) to do that sort of thing." |
| 621 |
msgstr "" |
| 622 |
"Zobacz opis CW<do> w podręczniku B<perlfunc>(1). Zauważ też, że opisane " |
| 623 |
"poniżej instrukcje kontroli pętli I<\\s-1NIE\\s0> będą działały w tej " |
| 624 |
"konstrukcji, gdyż modyfikatory nie pobierają etykiet pętli. Przykro mi. " |
| 625 |
"Możesz zawsze umieścić wewnątrz inny blok (dla CW<next>) lub też umieścić " |
| 626 |
"swoją instrukcję wewnątrz bloku (dla CW<last>), aby zrobić coś takiego. W " |
| 627 |
"przypadku CW<next> po prostu podwój nawiasy:" |
| 628 |
|
| 629 |
#. type: IX |
| 630 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 631 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 632 |
#, no-wrap |
| 633 |
msgid "next last redo" |
| 634 |
msgstr "" |
| 635 |
|
| 636 |
#. type: Plain text |
| 637 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 638 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 639 |
msgid "" |
| 640 |
"For CW<\\*(C`next\\*(C'> or CW<\\*(C`redo\\*(C'>, just double the braces:" |
| 641 |
msgstr "" |
| 642 |
|
| 643 |
#. type: Plain text |
| 644 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 645 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 646 |
#, fuzzy, no-wrap |
| 647 |
#| msgid "\\& do {{ \\& next if $x == $y; \\& # he's doing something here \\& }} until $x++ E<gt> $z;" |
| 648 |
msgid "" |
| 649 |
"\\& do {{\n" |
| 650 |
"\\& next if $x == $y;\n" |
| 651 |
"\\& # do something here\n" |
| 652 |
"\\& }} until $x++ E<gt> $z;\n" |
| 653 |
msgstr "\\& do {{ \\& next if $x == $y; \\& # coś tu robi \\& }} until $x++ E<gt> $z;" |
| 654 |
|
| 655 |
#. type: Plain text |
| 656 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 657 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 658 |
msgid "" |
| 659 |
"For CW<\\*(C`last\\*(C'>, you have to be more elaborate and put braces " |
| 660 |
"around it:" |
| 661 |
msgstr "" |
| 662 |
|
| 663 |
#. type: IX |
| 664 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 665 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 666 |
#, no-wrap |
| 667 |
msgid "last" |
| 668 |
msgstr "last" |
| 669 |
|
| 670 |
#. type: Plain text |
| 671 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 672 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 673 |
#, fuzzy, no-wrap |
| 674 |
#| msgid "\\& LOOP: { \\& do { \\& last if $x = $y**2; \\& # he's doing something here \\& } while $x++ E<lt>= $z; \\& }" |
| 675 |
msgid "" |
| 676 |
"\\& {\n" |
| 677 |
"\\& do {\n" |
| 678 |
"\\& last if $x == $y**2;\n" |
| 679 |
"\\& # do something here\n" |
| 680 |
"\\& } while $x++ E<lt>= $z;\n" |
| 681 |
"\\& }\n" |
| 682 |
msgstr "\\& LOOP: { \\& do { \\& last if $x = $y**2; \\& # coś tu robi \\& } while $x++ E<lt>= $z; \\& }" |
| 683 |
|
| 684 |
#. type: Plain text |
| 685 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 686 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 687 |
msgid "" |
| 688 |
"If you need both CW<\\*(C`next\\*(C'> and CW<\\*(C`last\\*(C'>, you have to " |
| 689 |
"do both and also use a loop label:" |
| 690 |
msgstr "" |
| 691 |
|
| 692 |
#. type: Plain text |
| 693 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 694 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 695 |
#, fuzzy, no-wrap |
| 696 |
#| msgid "\\& LOOP: { \\& do { \\& last if $x = $y**2; \\& # he's doing something here \\& } while $x++ E<lt>= $z; \\& }" |
| 697 |
msgid "" |
| 698 |
"\\& LOOP: {\n" |
| 699 |
"\\& do {{\n" |
| 700 |
"\\& next if $x == $y;\n" |
| 701 |
"\\& last LOOP if $x == $y**2;\n" |
| 702 |
"\\& # do something here\n" |
| 703 |
"\\& }} until $x++ E<gt> $z;\n" |
| 704 |
"\\& }\n" |
| 705 |
msgstr "\\& LOOP: { \\& do { \\& last if $x = $y**2; \\& # coś tu robi \\& } while $x++ E<lt>= $z; \\& }" |
| 706 |
|
| 707 |
#. type: Plain text |
| 708 |
#: debian-trixie debian-unstable |
| 709 |
msgid "" |
| 710 |
"\\&B<NOTE:> The behaviour of a CW<\\*(C`my\\*(C'>, CW<\\*(C`state\\*(C'>, or " |
| 711 |
"\\&CW<\\*(C`our\\*(C'> modified with a statement modifier conditional or " |
| 712 |
"loop construct (for example, CW<\\*(C`my $x if ...\\*(C'>) is " |
| 713 |
"\\&B<undefined>. The value of the CW<\\*(C`my\\*(C'> variable may be " |
| 714 |
"CW<\\*(C`undef\\*(C'>, any previously assigned value, or possibly anything " |
| 715 |
"else. Don't rely on it. Future versions of perl might do something " |
| 716 |
"different from the version of perl you try it out on. Here be dragons." |
| 717 |
msgstr "" |
| 718 |
|
| 719 |
#. type: IX |
| 720 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 721 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 722 |
#, no-wrap |
| 723 |
msgid "my" |
| 724 |
msgstr "my" |
| 725 |
|
| 726 |
#. type: Plain text |
| 727 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 728 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 729 |
msgid "" |
| 730 |
"The CW<\\*(C`when\\*(C'> modifier is an experimental feature that first " |
| 731 |
"appeared in Perl 5.14. To use it, you should include a CW<\\*(C`use " |
| 732 |
"v5.14\\*(C'> declaration. (Technically, it requires only the " |
| 733 |
"CW<\\*(C`switch\\*(C'> feature, but that aspect of it was not available " |
| 734 |
"before 5.14.) Operative only from within a CW<\\*(C`foreach\\*(C'> loop or " |
| 735 |
"a CW<\\*(C`given\\*(C'> block, it executes the statement only if the " |
| 736 |
"smartmatch \\&CW<\\*(C`$_ ~~ >\\f(CIEXPRCW<\\*(C'> is true. If the " |
| 737 |
"statement executes, it is followed by a CW<\\*(C`next\\*(C'> from inside a " |
| 738 |
"CW<\\*(C`foreach\\*(C'> and CW<\\*(C`break\\*(C'> from inside a " |
| 739 |
"CW<\\*(C`given\\*(C'>." |
| 740 |
msgstr "" |
| 741 |
|
| 742 |
#. type: Plain text |
| 743 |
#: debian-trixie debian-unstable |
| 744 |
msgid "" |
| 745 |
"Under the current implementation, the CW<\\*(C`foreach\\*(C'> loop can be " |
| 746 |
"anywhere within the CW<\\*(C`when\\*(C'> modifier's dynamic scope, but must " |
| 747 |
"be within the CW<\\*(C`given\\*(C'> block's lexical scope. This restriction " |
| 748 |
"may be relaxed in a future release. See \"Switch Statements\" below." |
| 749 |
msgstr "" |
| 750 |
|
| 751 |
#. type: IX |
| 752 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 753 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 754 |
#, fuzzy, no-wrap |
| 755 |
#| msgid "Compound Instructions" |
| 756 |
msgid "Compound Statements" |
| 757 |
msgstr "Instrukcje złożone" |
| 758 |
|
| 759 |
#. type: IX |
| 760 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 761 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 762 |
#, no-wrap |
| 763 |
msgid "statement, compound block bracket, curly curly bracket brace { } if unless given while until foreach for continue" |
| 764 |
msgstr "" |
| 765 |
|
| 766 |
#. type: Plain text |
| 767 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 768 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 769 |
#, fuzzy |
| 770 |
#| msgid "" |
| 771 |
#| "In Perl, a sequence of statements that defines a scope is called a block. " |
| 772 |
#| "Sometimes a block is bounded by the containing file (in the case of a " |
| 773 |
#| "required file or the program as a whole), and sometimes by the scope of a " |
| 774 |
#| "string (in the case of eval)." |
| 775 |
msgid "" |
| 776 |
"In Perl, a sequence of statements that defines a scope is called a block. " |
| 777 |
"Sometimes a block is delimited by the file containing it (in the case of a " |
| 778 |
"required file, or the program as a whole), and sometimes a block is " |
| 779 |
"delimited by the extent of a string (in the case of an eval)." |
| 780 |
msgstr "" |
| 781 |
"W perlu, sekwencja instrukcji definiująca zakres nazywana jest blokiem. " |
| 782 |
"Czasami ograniczeniem bloku stanowi zawierający go plik (w wypadku " |
| 783 |
"wymaganego (required) pliku lub programu jako całości), a czasami zasięg " |
| 784 |
"łańcucha znakowego (w wypadku eval)." |
| 785 |
|
| 786 |
#. type: Plain text |
| 787 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 788 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 789 |
msgid "" |
| 790 |
"But generally, a block is delimited by curly brackets, also known as " |
| 791 |
"braces. We will call this syntactic construct a BLOCK. Because enclosing " |
| 792 |
"braces are also the syntax for hash reference constructor expressions (see " |
| 793 |
"perlref), you may occasionally need to disambiguate by placing a " |
| 794 |
"\\&CW<\\*(C`;\\*(C'> immediately after an opening brace so that Perl " |
| 795 |
"realises the brace is the start of a block. You will more frequently need " |
| 796 |
"to disambiguate the other way, by placing a CW<\\*(C`+\\*(C'> immediately " |
| 797 |
"before an opening brace to force it to be interpreted as a hash reference " |
| 798 |
"constructor expression. It is considered good style to use these " |
| 799 |
"disambiguating mechanisms liberally, not only when Perl would otherwise " |
| 800 |
"guess incorrectly." |
| 801 |
msgstr "" |
| 802 |
|
| 803 |
#. type: Plain text |
| 804 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 805 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 806 |
msgid "The following compound statements may be used to control flow:" |
| 807 |
msgstr "Do kontroli przepływu można używać następujących instrukcji złożonych:" |
| 808 |
|
| 809 |
#. type: Plain text |
| 810 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 811 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 812 |
#, no-wrap |
| 813 |
msgid "" |
| 814 |
"\\& if (EXPR) BLOCK\n" |
| 815 |
"\\& if (EXPR) BLOCK else BLOCK\n" |
| 816 |
"\\& if (EXPR) BLOCK elsif (EXPR) BLOCK ...\n" |
| 817 |
"\\& if (EXPR) BLOCK elsif (EXPR) BLOCK ... else BLOCK\n" |
| 818 |
"\\&\n" |
| 819 |
"\\& unless (EXPR) BLOCK\n" |
| 820 |
"\\& unless (EXPR) BLOCK else BLOCK\n" |
| 821 |
"\\& unless (EXPR) BLOCK elsif (EXPR) BLOCK ...\n" |
| 822 |
"\\& unless (EXPR) BLOCK elsif (EXPR) BLOCK ... else BLOCK\n" |
| 823 |
"\\&\n" |
| 824 |
"\\& given (EXPR) BLOCK\n" |
| 825 |
"\\&\n" |
| 826 |
"\\& LABEL while (EXPR) BLOCK\n" |
| 827 |
"\\& LABEL while (EXPR) BLOCK continue BLOCK\n" |
| 828 |
"\\&\n" |
| 829 |
"\\& LABEL until (EXPR) BLOCK\n" |
| 830 |
"\\& LABEL until (EXPR) BLOCK continue BLOCK\n" |
| 831 |
"\\&\n" |
| 832 |
"\\& LABEL for (EXPR; EXPR; EXPR) BLOCK\n" |
| 833 |
"\\& LABEL for VAR (LIST) BLOCK\n" |
| 834 |
"\\& LABEL for VAR (LIST) BLOCK continue BLOCK\n" |
| 835 |
"\\&\n" |
| 836 |
"\\& LABEL foreach (EXPR; EXPR; EXPR) BLOCK\n" |
| 837 |
"\\& LABEL foreach VAR (LIST) BLOCK\n" |
| 838 |
"\\& LABEL foreach VAR (LIST) BLOCK continue BLOCK\n" |
| 839 |
"\\&\n" |
| 840 |
"\\& LABEL BLOCK\n" |
| 841 |
"\\& LABEL BLOCK continue BLOCK\n" |
| 842 |
"\\&\n" |
| 843 |
"\\& PHASE BLOCK\n" |
| 844 |
msgstr "" |
| 845 |
|
| 846 |
#. type: Plain text |
| 847 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 848 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 849 |
msgid "" |
| 850 |
"As of Perl 5.36, you can iterate over multiple values at a time by " |
| 851 |
"specifying a list of lexicals within parentheses:" |
| 852 |
msgstr "" |
| 853 |
|
| 854 |
#. type: Plain text |
| 855 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 856 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 857 |
#, no-wrap |
| 858 |
msgid "" |
| 859 |
"\\& LABEL for my (VAR, VAR) (LIST) BLOCK\n" |
| 860 |
"\\& LABEL for my (VAR, VAR) (LIST) BLOCK continue BLOCK\n" |
| 861 |
"\\& LABEL foreach my (VAR, VAR) (LIST) BLOCK\n" |
| 862 |
"\\& LABEL foreach my (VAR, VAR) (LIST) BLOCK continue BLOCK\n" |
| 863 |
msgstr "" |
| 864 |
|
| 865 |
#. type: Plain text |
| 866 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 867 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 868 |
msgid "" |
| 869 |
"If enabled by the CW<\\*(C`try\\*(C'> feature, the following may also be used" |
| 870 |
msgstr "" |
| 871 |
|
| 872 |
#. type: Plain text |
| 873 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 874 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 875 |
#, no-wrap |
| 876 |
msgid "" |
| 877 |
"\\& try BLOCK catch (VAR) BLOCK\n" |
| 878 |
"\\& try BLOCK catch (VAR) BLOCK finally BLOCK\n" |
| 879 |
msgstr "" |
| 880 |
|
| 881 |
#. type: Plain text |
| 882 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 883 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 884 |
msgid "" |
| 885 |
"The experimental CW<\\*(C`given\\*(C'> statement is I<not automatically " |
| 886 |
"enabled>; see \"Switch Statements\" below for how to do so, and the " |
| 887 |
"attendant caveats." |
| 888 |
msgstr "" |
| 889 |
|
| 890 |
#. type: Plain text |
| 891 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 892 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 893 |
#, fuzzy |
| 894 |
#| msgid "" |
| 895 |
#| "Note that unlike C and Pascal, these are defined in terms of BLOCKS, not " |
| 896 |
#| "statements. This means that the curly braces are essential--dangling " |
| 897 |
#| "statements are not allowed. If you want to write conditions without the " |
| 898 |
#| "braces, there are other ways to do it. The following examples all do the " |
| 899 |
#| "same thing:" |
| 900 |
msgid "" |
| 901 |
"Unlike in C and Pascal, in Perl these are all defined in terms of BLOCKs, " |
| 902 |
"not statements. This means that the curly brackets are I<required>--no " |
| 903 |
"dangling statements allowed. If you want to write conditionals without " |
| 904 |
"curly brackets, there are several other ways to do it. The following all do " |
| 905 |
"the same thing:" |
| 906 |
msgstr "" |
| 907 |
"Zauważ, że w przeciwieństwie do C i Pascala, są one zdefiniowane w " |
| 908 |
"kategoriach BLOKÓW, a nie instrukcji. Znaczy to, że nawiasy klamrowe są " |
| 909 |
"niezbędne--wiszące instrukcje nie są dozwolone. Jeśli chcesz pisać warunki " |
| 910 |
"bez nawiasów, to są na to inne sposoby. Następujące przykłady robią " |
| 911 |
"wszystkie to samo:" |
| 912 |
|
| 913 |
#. type: Plain text |
| 914 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 915 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 916 |
#, fuzzy, no-wrap |
| 917 |
#| msgid "\\& if (!open(FOO)) { die \"Can't open $FOO: $!\"; } \\& die \"Can't open $FOO: $!\" unless open(FOO); \\& open(FOO) or die \"Can't open $FOO: $!\"; # FOO or die! \\& open(FOO) ? 'hi mom' : die \"Can't open $FOO: $!\"; \\& # this last one is a bit exotic" |
| 918 |
msgid "" |
| 919 |
"\\& if (!open(FOO)) { die \"Can\\*(Aqt open $FOO: $!\" }\n" |
| 920 |
"\\& die \"Can\\*(Aqt open $FOO: $!\" unless open(FOO);\n" |
| 921 |
"\\& open(FOO) || die \"Can\\*(Aqt open $FOO: $!\";\n" |
| 922 |
"\\& open(FOO) ? () : die \"Can\\*(Aqt open $FOO: $!\";\n" |
| 923 |
"\\& # a bit exotic, that last one\n" |
| 924 |
msgstr "\\& if (!open(FOO)) { die \"Can't open $FOO: $!\"; } \\& die \"Can't open $FOO: $!\" unless open(FOO); \\& open(FOO) or die \"Can't open $FOO: $!\"; # FOO lub giń! \\& open(FOO) ? 'hi mom' : die \"Can't open $FOO: $!\"; \\& # to ostatnie trochę egzotyczne" |
| 925 |
|
| 926 |
#. type: Plain text |
| 927 |
#: debian-trixie debian-unstable |
| 928 |
msgid "" |
| 929 |
"The CW<\\*(C`if\\*(C'> statement is straightforward. Because BLOCKs are " |
| 930 |
"always bounded by curly brackets, there is never any ambiguity about which " |
| 931 |
"\\&CW<\\*(C`if\\*(C'> an CW<\\*(C`else\\*(C'> goes with. If you use " |
| 932 |
"CW<\\*(C`unless\\*(C'> in place of CW<\\*(C`if\\*(C'>, the sense of the test " |
| 933 |
"is reversed. Like CW<\\*(C`if\\*(C'>, CW<\\*(C`unless\\*(C'> can be " |
| 934 |
"followed by CW<\\*(C`else\\*(C'>. CW<\\*(C`unless\\*(C'> can even be " |
| 935 |
"followed by one or more CW<\\*(C`elsif\\*(C'> statements, though you may " |
| 936 |
"want to think twice before using that particular language construct, as " |
| 937 |
"everyone reading your code will have to think at least twice before they can " |
| 938 |
"understand what's going on." |
| 939 |
msgstr "" |
| 940 |
|
| 941 |
#. type: Plain text |
| 942 |
#: debian-trixie debian-unstable |
| 943 |
#, fuzzy |
| 944 |
#| msgid "" |
| 945 |
#| "The CW<while> statement executes its block as long as expression is true " |
| 946 |
#| "(its value is not the empty string, 0, or \\*(L\"0\"). \\s-1LABEL\\s0 is " |
| 947 |
#| "optional, and if present, consists of an identifier followed by a colon. " |
| 948 |
#| "\\s-1LABEL\\s0 identifies the loop for loop control statements, which are " |
| 949 |
#| "CW<next>, CW<last>, and CW<redo>. If \\s-1LABEL\\s0 is omitted, the loop " |
| 950 |
#| "control statements refer to the innermost enclosing loop. This may " |
| 951 |
#| "require dynamically looking back through the call stack at run time to " |
| 952 |
#| "find the appropriate \\s-1LABEL\\s0. Such desperate behavior usually " |
| 953 |
#| "produces warnings when the B<-w> flag is on." |
| 954 |
msgid "" |
| 955 |
"The CW<\\*(C`while\\*(C'> statement executes the block as long as the " |
| 956 |
"expression is true. The CW<\\*(C`until\\*(C'> statement executes the block " |
| 957 |
"as long as the expression is false. The LABEL is optional, and if present, " |
| 958 |
"consists of an identifier followed by a colon. The LABEL identifies the " |
| 959 |
"loop for the loop control statements CW<\\*(C`next\\*(C'>, " |
| 960 |
"CW<\\*(C`last\\*(C'>, and CW<\\*(C`redo\\*(C'>. If the LABEL is omitted, " |
| 961 |
"the loop control statement refers to the innermost enclosing loop. This may " |
| 962 |
"include dynamically searching through your call-stack at run time to find " |
| 963 |
"the LABEL. Such desperate behavior triggers a warning if you use the " |
| 964 |
"CW<\\*(C`use warnings\\*(C'> pragma or the B<-w> flag." |
| 965 |
msgstr "" |
| 966 |
"Instrukcja CW<while> wykonuje swój blok tak długo, jak wyrażenie jest " |
| 967 |
"prawdziwe (jego wartością nie jest łańcuch pusty, 0 czy \\*(L\"0\"). " |
| 968 |
"\\s-1ETYKIETA\\s0 jest opcjonalna, a jeśli jest obecna, składa się z " |
| 969 |
"identyfikatora, za którym następuje dwukropek. \\s-1ETYKIETA\\s0 " |
| 970 |
"identyfikuje pętlę dla instrukcji kontroli pętli, czyli CW<next>, CW<last> i " |
| 971 |
"CW<redo>. Jeśli pominięto \\s-1ETYKIETĘ\\s0, instrukcje kontroli pętli " |
| 972 |
"odnoszą się do najbardziej wewnętrznej otaczającej pętli. Może to wymagać " |
| 973 |
"dynamicznego przeglądania wstecz stosu wywołań w czasie wykonania, aby " |
| 974 |
"znaleźć odpowiednią \\s-1ETYKIETĘ\\s0. Takie desperackie zachowania dają " |
| 975 |
"zwykle ostrzeżenia przy włączonej fladze B<-w>." |
| 976 |
|
| 977 |
#. type: Plain text |
| 978 |
#: debian-trixie debian-unstable |
| 979 |
msgid "" |
| 980 |
"If the condition expression of a CW<\\*(C`while\\*(C'> statement is based on " |
| 981 |
"any of a group of iterative expression types then it gets some magic " |
| 982 |
"treatment. The affected iterative expression types are " |
| 983 |
"CW<\\*(C`readline\\*(C'>, the CW<\\*(C`E<lt>FILEHANDLEE<gt>\\*(C'> input " |
| 984 |
"operator, CW<\\*(C`readdir\\*(C'>, CW<\\*(C`glob\\*(C'>, the " |
| 985 |
"CW<\\*(C`E<lt>PATTERNE<gt>\\*(C'> globbing operator, and " |
| 986 |
"CW<\\*(C`each\\*(C'>. If the condition expression is one of these " |
| 987 |
"expression types, then the value yielded by the iterative operator will be " |
| 988 |
"implicitly assigned to CW<$_>. If the condition expression is one of these " |
| 989 |
"expression types or an explicit assignment of one of them to a scalar, then " |
| 990 |
"the condition actually tests for definedness of the expression's value, not " |
| 991 |
"for its regular truth value." |
| 992 |
msgstr "" |
| 993 |
|
| 994 |
#. type: Plain text |
| 995 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 996 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 997 |
#, fuzzy |
| 998 |
#| msgid "" |
| 999 |
#| "If there is a \\s-1BLOK\\s0 CW<continue>, it is always executed just " |
| 1000 |
#| "before the next condition is evaluated, similar to the third element of a " |
| 1001 |
#| "CW<for> loop in C. This can be used to increment the loop control " |
| 1002 |
#| "variable even when the loop is just being continued by a CW<next> " |
| 1003 |
#| "statement (which is in turn similar to the CW<continue> statement)." |
| 1004 |
msgid "" |
| 1005 |
"If there is a CW<\\*(C`continue\\*(C'> BLOCK, it is always executed just " |
| 1006 |
"before the conditional is about to be evaluated again. Thus it can be used " |
| 1007 |
"to increment a loop variable, even when the loop has been continued via the " |
| 1008 |
"CW<\\*(C`next\\*(C'> statement." |
| 1009 |
msgstr "" |
| 1010 |
"Jeśli istnieje \\s-1BLOK\\s0 CW<continue>, to jest on zawsze wykonywany tuż " |
| 1011 |
"przed kolejną analizą warunku, podobnie jak trzeci element pętli CW<for> w " |
| 1012 |
"C. Można tego używać do zwiększania zmiennej sterującej pętli, nawet gdy " |
| 1013 |
"pętla jest właśnie kontynuowana instrukcją CW<next> (która jest z kolei " |
| 1014 |
"podobna do instrukcji CW<continue> z C)." |
| 1015 |
|
| 1016 |
#. type: Plain text |
| 1017 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1018 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1019 |
msgid "" |
| 1020 |
"When a block is preceded by a compilation phase keyword such as " |
| 1021 |
"CW<\\*(C`BEGIN\\*(C'>, \\&CW<\\*(C`END\\*(C'>, CW<\\*(C`INIT\\*(C'>, " |
| 1022 |
"CW<\\*(C`CHECK\\*(C'>, or CW<\\*(C`UNITCHECK\\*(C'>, then the block will run " |
| 1023 |
"only during the corresponding phase of execution. See perlmod for more " |
| 1024 |
"details." |
| 1025 |
msgstr "" |
| 1026 |
|
| 1027 |
#. type: Plain text |
| 1028 |
#: debian-trixie debian-unstable |
| 1029 |
msgid "" |
| 1030 |
"Extension modules can also hook into the Perl parser to define new kinds of " |
| 1031 |
"compound statements. These are introduced by a keyword which the extension " |
| 1032 |
"recognizes, and the syntax following the keyword is defined entirely by the " |
| 1033 |
"extension. If you are an implementor, see \"PL_keyword_plugin\" in perlapi " |
| 1034 |
"for the mechanism. If you are using such a module, see the module's " |
| 1035 |
"documentation for details of the syntax that it defines." |
| 1036 |
msgstr "" |
| 1037 |
|
| 1038 |
#. type: IX |
| 1039 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1040 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1041 |
#, no-wrap |
| 1042 |
msgid "Loop Control" |
| 1043 |
msgstr "Kontrola pętli" |
| 1044 |
|
| 1045 |
#. type: IX |
| 1046 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1047 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1048 |
#, no-wrap |
| 1049 |
msgid "loop control loop, control next last redo continue" |
| 1050 |
msgstr "" |
| 1051 |
|
| 1052 |
#. type: Plain text |
| 1053 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1054 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1055 |
#, fuzzy |
| 1056 |
#| msgid "" |
| 1057 |
#| "The CW<next> command is similar to the CW<continue> statement in C; it " |
| 1058 |
#| "starts a new iteration of the loop:" |
| 1059 |
msgid "The CW<\\*(C`next\\*(C'> command starts the next iteration of the loop:" |
| 1060 |
msgstr "" |
| 1061 |
"Polecenie CW<next> jest podobne do instrukcji CW<continue> z C; rozpoczyna " |
| 1062 |
"nową iterację pętli:" |
| 1063 |
|
| 1064 |
#. type: Plain text |
| 1065 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1066 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1067 |
#, no-wrap |
| 1068 |
msgid "" |
| 1069 |
"\\& LINE: while (E<lt>STDINE<gt>) {\n" |
| 1070 |
"\\& next LINE if /^#/; # discard comments\n" |
| 1071 |
"\\& ...\n" |
| 1072 |
"\\& }\n" |
| 1073 |
msgstr "" |
| 1074 |
"\\& LINE: while (E<lt>STDINE<gt>) {\n" |
| 1075 |
"\\& next LINE if /^#/; # wykasuj komentarze\n" |
| 1076 |
"\\& ...\n" |
| 1077 |
"\\& }\n" |
| 1078 |
|
| 1079 |
#. type: Plain text |
| 1080 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1081 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1082 |
#, fuzzy |
| 1083 |
#| msgid "" |
| 1084 |
#| "The CW<last> command is similar to the CW<break> statement from C (used " |
| 1085 |
#| "in loops); it exits the loop immediately. The CW<continue> block is not " |
| 1086 |
#| "executed:" |
| 1087 |
msgid "" |
| 1088 |
"The CW<\\*(C`last\\*(C'> command immediately exits the loop in question. " |
| 1089 |
"The \\&CW<\\*(C`continue\\*(C'> block, if any, is not executed:" |
| 1090 |
msgstr "" |
| 1091 |
"Polecenie CW<last> jest podobne do instrukcji CW<break> z C (używanej w " |
| 1092 |
"pętlach); natychmiastowo opuszcza pętlę. Blok CW<continue> nie jest " |
| 1093 |
"wykonywany:" |
| 1094 |
|
| 1095 |
#. type: Plain text |
| 1096 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1097 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1098 |
#, no-wrap |
| 1099 |
msgid "" |
| 1100 |
"\\& LINE: while (E<lt>STDINE<gt>) {\n" |
| 1101 |
"\\& last LINE if /^$/; # exit when done with header\n" |
| 1102 |
"\\& ...\n" |
| 1103 |
"\\& }\n" |
| 1104 |
msgstr "" |
| 1105 |
"\\& LINE: while (E<lt>STDINE<gt>) {\n" |
| 1106 |
"\\& last LINE if /^$/; # zakończ po obsłużeniu nagłówka\n" |
| 1107 |
"\\& ...\n" |
| 1108 |
"\\& }\n" |
| 1109 |
|
| 1110 |
#. type: Plain text |
| 1111 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1112 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1113 |
#, fuzzy |
| 1114 |
#| msgid "" |
| 1115 |
#| "The CW<redo> command restarts the loop without re-evaluating the " |
| 1116 |
#| "condition. The CW<continue> block is not executed. This command is " |
| 1117 |
#| "typically used in programs that want to lie to themselves about what they " |
| 1118 |
#| "just got as input." |
| 1119 |
msgid "" |
| 1120 |
"The CW<\\*(C`redo\\*(C'> command restarts the loop block without evaluating " |
| 1121 |
"the conditional again. The CW<\\*(C`continue\\*(C'> block, if any, is " |
| 1122 |
"I<not> executed. This command is normally used by programs that want to lie " |
| 1123 |
"to themselves about what was just input." |
| 1124 |
msgstr "" |
| 1125 |
"Polecenie CW<redo> restartuje pętlę bez ponownego analizowania warunku. " |
| 1126 |
"Blok CW<continue> nie jest wykonywany. Polecenie to jest zazwyczaj używane w " |
| 1127 |
"programach, które chcą się okłamywać co do tego, co właśnie pobrały z " |
| 1128 |
"wejścia." |
| 1129 |
|
| 1130 |
#. type: Plain text |
| 1131 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1132 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1133 |
#, fuzzy |
| 1134 |
#| msgid "" |
| 1135 |
#| "For example, when processing a file like I</etc/termcap>. If your input " |
| 1136 |
#| "lines can end with backslashes, indicating continuation, you may want to " |
| 1137 |
#| "prefetch the next record." |
| 1138 |
msgid "" |
| 1139 |
"For example, when processing a file like I</etc/termcap>. If your input " |
| 1140 |
"lines might end in backslashes to indicate continuation, you want to skip " |
| 1141 |
"ahead and get the next record." |
| 1142 |
msgstr "" |
| 1143 |
"Na przykład, podczas przetwarzania pliku takiego, jak I</etc/termcap>. " |
| 1144 |
"Jeśli twoje wiersze wejściowe mogą się kończyć lewymi ukośnikami, " |
| 1145 |
"wskazującymi kontynuację, możesz chcieć z wyprzedzeniem pobrać następny " |
| 1146 |
"rekord." |
| 1147 |
|
| 1148 |
#. type: Plain text |
| 1149 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1150 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1151 |
#, no-wrap |
| 1152 |
msgid "" |
| 1153 |
"\\& while (E<lt>E<gt>) {\n" |
| 1154 |
"\\& chomp;\n" |
| 1155 |
"\\& if (s/\\e\\e$//) {\n" |
| 1156 |
"\\& $_ .= E<lt>E<gt>;\n" |
| 1157 |
"\\& redo unless eof();\n" |
| 1158 |
"\\& }\n" |
| 1159 |
"\\& # now process $_\n" |
| 1160 |
"\\& }\n" |
| 1161 |
msgstr "" |
| 1162 |
"\\& while (E<lt>E<gt>) {\n" |
| 1163 |
"\\& chomp;\n" |
| 1164 |
"\\& if (s/\\e\\e$//) {\n" |
| 1165 |
"\\& $_ .= E<lt>E<gt>;\n" |
| 1166 |
"\\& redo unless eof();\n" |
| 1167 |
"\\& }\n" |
| 1168 |
"\\& # teraz przetwórz $_\n" |
| 1169 |
"\\& }\n" |
| 1170 |
|
| 1171 |
#. type: Plain text |
| 1172 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1173 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1174 |
#, fuzzy |
| 1175 |
#| msgid "which is a Perl shorthand for the more literal version:" |
| 1176 |
msgid "which is Perl shorthand for the more explicitly written version:" |
| 1177 |
msgstr "co w perlu jest skrótem dla wersji napisanej bardziej dosłownie:" |
| 1178 |
|
| 1179 |
#. type: Plain text |
| 1180 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1181 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1182 |
#, fuzzy, no-wrap |
| 1183 |
#| msgid "\\& LINE: while (defined($line = E<lt>ARGVE<gt>)) { \\& chomp($line); \\& if ($line =~ s/\\e\\e$//) { \\& $line .= E<lt>ARGVE<gt>; \\& redo LINE unless eof(); # not eof(ARGV)! \\& } \\& # now process $line \\& }" |
| 1184 |
msgid "" |
| 1185 |
"\\& LINE: while (defined($line = E<lt>ARGVE<gt>)) {\n" |
| 1186 |
"\\& chomp($line);\n" |
| 1187 |
"\\& if ($line =~ s/\\e\\e$//) {\n" |
| 1188 |
"\\& $line .= E<lt>ARGVE<gt>;\n" |
| 1189 |
"\\& redo LINE unless eof(); # not eof(ARGV)!\n" |
| 1190 |
"\\& }\n" |
| 1191 |
"\\& # now process $line\n" |
| 1192 |
"\\& }\n" |
| 1193 |
msgstr "\\& LINE: while (defined($line = E<lt>ARGVE<gt>)) { \\& chomp($line); \\& if ($line =~ s/\\e\\e$//) { \\& $line .= E<lt>ARGVE<gt>; \\& redo LINE unless eof(); # nie eof(ARGV)! \\& } \\& # teraz przetwórz $line \\& }" |
| 1194 |
|
| 1195 |
#. type: Plain text |
| 1196 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1197 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1198 |
#, fuzzy |
| 1199 |
#| msgid "" |
| 1200 |
#| "Note that if there was a CW<continue> block in the above code, it would " |
| 1201 |
#| "be called even for deleted rows. This block is often used to reset row " |
| 1202 |
#| "counters or single-shot CW<?pattern?> matches." |
| 1203 |
msgid "" |
| 1204 |
"Note that if there were a CW<\\*(C`continue\\*(C'> block on the above code, " |
| 1205 |
"it would get executed only on lines discarded by the regex (since redo skips " |
| 1206 |
"the continue block). A continue block is often used to reset line counters " |
| 1207 |
"or CW<\\*(C`m?pat?\\*(C'> one-time matches:" |
| 1208 |
msgstr "" |
| 1209 |
"Zauważ, że jeśli w powyższym kodzie istniałby blok CW<continue>, został by " |
| 1210 |
"on wywołany nawet dla usuniętych wierszy. Blok ten jest często używany do " |
| 1211 |
"resetowania liczników wierszy czy jednokrotnych dopasowań CW<?wzorców?>." |
| 1212 |
|
| 1213 |
#. type: Plain text |
| 1214 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1215 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1216 |
#, fuzzy, no-wrap |
| 1217 |
#| msgid "\\& # inspired by :1,$g/fred/s//WILMA/ \\& while (E<lt>E<gt>) { \\& ?(fred)? && s//WILMA $1 WILMA/; \\& ?(barney)? && s//BETTY $1 BETTY/; \\& ?(homer)? && s//MARGE $1 MARGE/; \\& } continue { \\& print \"$ARGV $.: $_\"; \\& close ARGV if eof(); # reset $. (line no.) \\& reset if eof(); # reset ?pattern? \\& }" |
| 1218 |
msgid "" |
| 1219 |
"\\& # inspired by :1,$g/fred/s//WILMA/\n" |
| 1220 |
"\\& while (E<lt>E<gt>) {\n" |
| 1221 |
"\\& m?(fred)? && s//WILMA $1 WILMA/;\n" |
| 1222 |
"\\& m?(barney)? && s//BETTY $1 BETTY/;\n" |
| 1223 |
"\\& m?(homer)? && s//MARGE $1 MARGE/;\n" |
| 1224 |
"\\& } continue {\n" |
| 1225 |
"\\& print \"$ARGV $.: $_\";\n" |
| 1226 |
"\\& close ARGV if eof; # reset $.\n" |
| 1227 |
"\\& reset if eof; # reset ?pat?\n" |
| 1228 |
"\\& }\n" |
| 1229 |
msgstr "\\& # zainspirowane przez :1,$g/fred/s//WILMA/ \\& while (E<lt>E<gt>) { \\& ?(fred)? && s//WILMA $1 WILMA/; \\& ?(barney)? && s//BETTY $1 BETTY/; \\& ?(homer)? && s//MARGE $1 MARGE/; \\& } continue { \\& print \"$ARGV $.: $_\"; \\& close ARGV if eof(); # reset $. (nr wiersza) \\& reset if eof(); # reset ?wzorca? \\& }" |
| 1230 |
|
| 1231 |
#. type: Plain text |
| 1232 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1233 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1234 |
#, fuzzy |
| 1235 |
#| msgid "" |
| 1236 |
#| "If the word CW<while> is replaced by the word CW<until>, the meaning of " |
| 1237 |
#| "the test is reversed, but the condition is still tested in the first " |
| 1238 |
#| "iteration." |
| 1239 |
msgid "" |
| 1240 |
"If the word CW<\\*(C`while\\*(C'> is replaced by the word " |
| 1241 |
"CW<\\*(C`until\\*(C'>, the sense of the test is reversed, but the " |
| 1242 |
"conditional is still tested before the first iteration." |
| 1243 |
msgstr "" |
| 1244 |
"Jeśli słowo CW<while> jest zamieniane słowem CW<until>, to sens testu jest " |
| 1245 |
"odwrócony, lecz warunek jest wciąż testowany w pierwszej iteracji." |
| 1246 |
|
| 1247 |
#. type: Plain text |
| 1248 |
#: debian-trixie debian-unstable |
| 1249 |
#, fuzzy |
| 1250 |
#| msgid "" |
| 1251 |
#| "Loop control statements don't work with CW<if> or CW<unless>, since they " |
| 1252 |
#| "aren't loops. You can double the parentheses to make them loops, though." |
| 1253 |
msgid "" |
| 1254 |
"Loop control statements don't work in an CW<\\*(C`if\\*(C'> or " |
| 1255 |
"CW<\\*(C`unless\\*(C'>, since they aren't loops. You can double the braces " |
| 1256 |
"to make them such, though." |
| 1257 |
msgstr "" |
| 1258 |
"Instrukcje sterujące pętli nie współpracują z CW<if> ani CW<unless>, gdyż " |
| 1259 |
"nie są one pętlami. Możesz jednak podwoić nawiasy by je nimi uczynić." |
| 1260 |
|
| 1261 |
#. type: Plain text |
| 1262 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1263 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1264 |
#, no-wrap |
| 1265 |
msgid "" |
| 1266 |
"\\& if (/pattern/) {{\n" |
| 1267 |
"\\& last if /fred/;\n" |
| 1268 |
"\\& next if /barney/; # same effect as \"last\",\n" |
| 1269 |
"\\& # but doesn\\*(Aqt document as well\n" |
| 1270 |
"\\& # do something here\n" |
| 1271 |
"\\& }}\n" |
| 1272 |
msgstr "" |
| 1273 |
|
| 1274 |
#. type: Plain text |
| 1275 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1276 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1277 |
msgid "" |
| 1278 |
"This is caused by the fact that a block by itself acts as a loop that " |
| 1279 |
"executes once, see \"Basic BLOCKs\"." |
| 1280 |
msgstr "" |
| 1281 |
|
| 1282 |
#. type: Plain text |
| 1283 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1284 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1285 |
#, fuzzy |
| 1286 |
#| msgid "" |
| 1287 |
#| "The form CW<while/if BLOCK BLOCK> that was available in Perl 4 is no " |
| 1288 |
#| "longer valid. Change all occurrences of CW<if BLOCK> to CW<if (do BLOCK)>." |
| 1289 |
msgid "" |
| 1290 |
"The form CW<\\*(C`while/if BLOCK BLOCK\\*(C'>, available in Perl 4, is no " |
| 1291 |
"longer available. Replace any occurrence of CW<\\*(C`if BLOCK\\*(C'> by " |
| 1292 |
"CW<\\*(C`if (do BLOCK)\\*(C'>." |
| 1293 |
msgstr "" |
| 1294 |
"Postać CW<while/if BLOCK BLOCK>, która była dostępna w Perl 4 nie jest już " |
| 1295 |
"prawidłowa. Zmień wszystkie wystąpienia CW<if BLOCK> na CW<if (do BLOCK)>." |
| 1296 |
|
| 1297 |
#. type: IX |
| 1298 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1299 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1300 |
#, no-wrap |
| 1301 |
msgid "For Loops" |
| 1302 |
msgstr "Pętle for" |
| 1303 |
|
| 1304 |
#. type: IX |
| 1305 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1306 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1307 |
#, no-wrap |
| 1308 |
msgid "for foreach" |
| 1309 |
msgstr "" |
| 1310 |
|
| 1311 |
#. type: Plain text |
| 1312 |
#: debian-trixie debian-unstable |
| 1313 |
#, fuzzy |
| 1314 |
#| msgid "" |
| 1315 |
#| "Perl's C-style CW<for> loop works exactly like its corresponding while " |
| 1316 |
#| "loop, which means that:" |
| 1317 |
msgid "" |
| 1318 |
"Perl's C-style CW<\\*(C`for\\*(C'> loop works like the corresponding " |
| 1319 |
"CW<\\*(C`while\\*(C'> loop; that means that this:" |
| 1320 |
msgstr "" |
| 1321 |
"Perlowa pętla CW<for> w stylu C, działa dokładnie jak odpowiadająca jej " |
| 1322 |
"pętla while, co znaczy, że to:" |
| 1323 |
|
| 1324 |
#. type: Plain text |
| 1325 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1326 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1327 |
#, no-wrap |
| 1328 |
msgid "" |
| 1329 |
"\\& for ($i = 1; $i E<lt> 10; $i++) {\n" |
| 1330 |
"\\& ...\n" |
| 1331 |
"\\& }\n" |
| 1332 |
msgstr "" |
| 1333 |
"\\& for ($i = 1; $i E<lt> 10; $i++) {\n" |
| 1334 |
"\\& ...\n" |
| 1335 |
"\\& }\n" |
| 1336 |
|
| 1337 |
#. type: Plain text |
| 1338 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1339 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1340 |
msgid "is the same as this:" |
| 1341 |
msgstr "jest tym samym, co to:" |
| 1342 |
|
| 1343 |
#. type: Plain text |
| 1344 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1345 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1346 |
#, no-wrap |
| 1347 |
msgid "" |
| 1348 |
"\\& $i = 1;\n" |
| 1349 |
"\\& while ($i E<lt> 10) {\n" |
| 1350 |
"\\& ...\n" |
| 1351 |
"\\& } continue {\n" |
| 1352 |
"\\& $i++;\n" |
| 1353 |
"\\& }\n" |
| 1354 |
msgstr "" |
| 1355 |
"\\& $i = 1;\n" |
| 1356 |
"\\& while ($i E<lt> 10) {\n" |
| 1357 |
"\\& ...\n" |
| 1358 |
"\\& } continue {\n" |
| 1359 |
"\\& $i++;\n" |
| 1360 |
"\\& }\n" |
| 1361 |
|
| 1362 |
#. type: Plain text |
| 1363 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1364 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1365 |
msgid "" |
| 1366 |
"There is one minor difference: if variables are declared with " |
| 1367 |
"CW<\\*(C`my\\*(C'> in the initialization section of the CW<\\*(C`for\\*(C'>, " |
| 1368 |
"the lexical scope of those variables is exactly the CW<\\*(C`for\\*(C'> loop " |
| 1369 |
"(the body of the loop and the control sections). To illustrate:" |
| 1370 |
msgstr "" |
| 1371 |
|
| 1372 |
#. type: Plain text |
| 1373 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1374 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1375 |
#, no-wrap |
| 1376 |
msgid "" |
| 1377 |
"\\& my $i = \\*(Aqsamba\\*(Aq;\n" |
| 1378 |
"\\& for (my $i = 1; $i E<lt>= 4; $i++) {\n" |
| 1379 |
"\\& print \"$i\\en\";\n" |
| 1380 |
"\\& }\n" |
| 1381 |
"\\& print \"$i\\en\";\n" |
| 1382 |
msgstr "" |
| 1383 |
"\\& my $i = \\*(Aqsamba\\*(Aq;\n" |
| 1384 |
"\\& for (my $i = 1; $i E<lt>= 4; $i++) {\n" |
| 1385 |
"\\& print \"$i\\en\";\n" |
| 1386 |
"\\& }\n" |
| 1387 |
"\\& print \"$i\\en\";\n" |
| 1388 |
|
| 1389 |
#. type: Plain text |
| 1390 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1391 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1392 |
msgid "when executed, gives:" |
| 1393 |
msgstr "" |
| 1394 |
|
| 1395 |
#. type: Plain text |
| 1396 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1397 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1398 |
#, no-wrap |
| 1399 |
msgid "" |
| 1400 |
"\\& 1\n" |
| 1401 |
"\\& 2\n" |
| 1402 |
"\\& 3\n" |
| 1403 |
"\\& 4\n" |
| 1404 |
"\\& samba\n" |
| 1405 |
msgstr "" |
| 1406 |
"\\& 1\n" |
| 1407 |
"\\& 2\n" |
| 1408 |
"\\& 3\n" |
| 1409 |
"\\& 4\n" |
| 1410 |
"\\& samba\n" |
| 1411 |
|
| 1412 |
#. type: Plain text |
| 1413 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1414 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1415 |
msgid "" |
| 1416 |
"As a special case, if the test in the CW<\\*(C`for\\*(C'> loop (or the " |
| 1417 |
"corresponding \\&CW<\\*(C`while\\*(C'> loop) is empty, it is treated as " |
| 1418 |
"true. That is, both" |
| 1419 |
msgstr "" |
| 1420 |
|
| 1421 |
#. type: Plain text |
| 1422 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1423 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1424 |
#, no-wrap |
| 1425 |
msgid "" |
| 1426 |
"\\& for (;;) {\n" |
| 1427 |
"\\& ...\n" |
| 1428 |
"\\& }\n" |
| 1429 |
msgstr "" |
| 1430 |
"\\& for (;;) {\n" |
| 1431 |
"\\& ...\n" |
| 1432 |
"\\& }\n" |
| 1433 |
|
| 1434 |
#. type: Plain text |
| 1435 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1436 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1437 |
msgid "and" |
| 1438 |
msgstr "i" |
| 1439 |
|
| 1440 |
#. type: Plain text |
| 1441 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1442 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1443 |
#, no-wrap |
| 1444 |
msgid "" |
| 1445 |
"\\& while () {\n" |
| 1446 |
"\\& ...\n" |
| 1447 |
"\\& }\n" |
| 1448 |
msgstr "" |
| 1449 |
"\\& while () {\n" |
| 1450 |
"\\& ...\n" |
| 1451 |
"\\& }\n" |
| 1452 |
|
| 1453 |
#. type: Plain text |
| 1454 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1455 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1456 |
msgid "are treated as infinite loops." |
| 1457 |
msgstr "" |
| 1458 |
|
| 1459 |
#. type: Plain text |
| 1460 |
#: debian-trixie debian-unstable |
| 1461 |
#, fuzzy |
| 1462 |
#| msgid "" |
| 1463 |
#| "Besides simply looping through array indices, CW<for> has many other " |
| 1464 |
#| "uses. Here is an example that avoids the problem encountered when " |
| 1465 |
#| "explicitly testing for EOF on an interactive file descriptor, which " |
| 1466 |
#| "causes the program to appear to hang." |
| 1467 |
msgid "" |
| 1468 |
"Besides the normal array index looping, CW<\\*(C`for\\*(C'> can lend itself " |
| 1469 |
"to many other interesting applications. Here's one that avoids the problem " |
| 1470 |
"you get into if you explicitly test for end-of-file on an interactive file " |
| 1471 |
"descriptor causing your program to appear to hang." |
| 1472 |
msgstr "" |
| 1473 |
"Poza zwykłymi pętlami po indeksach tablic, CW<for> daje wiele innych " |
| 1474 |
"zastosowań. Oto przykład, zapobiegający problemowi, który napotyka się " |
| 1475 |
"testując jawnie EOF na interaktywnym deskryptorze pliku, co powoduje, że " |
| 1476 |
"program wygląda jakby się zawiesił." |
| 1477 |
|
| 1478 |
#. type: IX |
| 1479 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1480 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1481 |
#, no-wrap |
| 1482 |
msgid "eof end-of-file end of file" |
| 1483 |
msgstr "" |
| 1484 |
|
| 1485 |
#. type: Plain text |
| 1486 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1487 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1488 |
#, no-wrap |
| 1489 |
msgid "" |
| 1490 |
"\\& $on_a_tty = -t STDIN && -t STDOUT;\n" |
| 1491 |
"\\& sub prompt { print \"yes? \" if $on_a_tty }\n" |
| 1492 |
"\\& for ( prompt(); E<lt>STDINE<gt>; prompt() ) {\n" |
| 1493 |
"\\& # do something\n" |
| 1494 |
"\\& }\n" |
| 1495 |
msgstr "" |
| 1496 |
"\\& $on_a_tty = -t STDIN && -t STDOUT;\n" |
| 1497 |
"\\& sub prompt { print \"yes? \" if $on_a_tty }\n" |
| 1498 |
"\\& for ( prompt(); E<lt>STDINE<gt>; prompt() ) {\n" |
| 1499 |
"\\& # zrób coś\n" |
| 1500 |
"\\& }\n" |
| 1501 |
|
| 1502 |
#. type: Plain text |
| 1503 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1504 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1505 |
msgid "" |
| 1506 |
"The condition expression of a CW<\\*(C`for\\*(C'> loop gets the same magic " |
| 1507 |
"treatment of \\&CW<\\*(C`readline\\*(C'> et al that the condition expression " |
| 1508 |
"of a CW<\\*(C`while\\*(C'> loop gets." |
| 1509 |
msgstr "" |
| 1510 |
|
| 1511 |
#. type: IX |
| 1512 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1513 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1514 |
#, no-wrap |
| 1515 |
msgid "Foreach Loops" |
| 1516 |
msgstr "Pętle foreach" |
| 1517 |
|
| 1518 |
#. type: Plain text |
| 1519 |
#: debian-trixie debian-unstable |
| 1520 |
#, fuzzy |
| 1521 |
#| msgid "" |
| 1522 |
#| "The CW<foreach> loop iterates through a normal list value and assigns the " |
| 1523 |
#| "variable \\s-1VAR\\s0 the value of each successive element of the list. " |
| 1524 |
#| "If the variable is preceded by the keyword CW<my>, then it is lexically " |
| 1525 |
#| "scoped and visible only within the loop. Otherwise, the variable is " |
| 1526 |
#| "implicitly local to the loop and, upon exiting it, regains its original " |
| 1527 |
#| "value. If the variable was previously declared by CW<my>, then the loop " |
| 1528 |
#| "uses that variable instead of the global variable, but it is still local " |
| 1529 |
#| "to the loop. (Note that lexically scoped variables can cause problems if " |
| 1530 |
#| "you have procedures or format declarations referencing them within the " |
| 1531 |
#| "loop.)" |
| 1532 |
msgid "" |
| 1533 |
"The CW<\\*(C`foreach\\*(C'> loop iterates over a normal list value and sets " |
| 1534 |
"the scalar variable VAR to be each element of the list in turn. If the " |
| 1535 |
"variable is preceded with the keyword CW<\\*(C`my\\*(C'>, then it is " |
| 1536 |
"lexically scoped, and is therefore visible only within the loop. Otherwise, " |
| 1537 |
"the variable is implicitly local to the loop and regains its former value " |
| 1538 |
"upon exiting the loop. If the variable was previously declared with " |
| 1539 |
"CW<\\*(C`my\\*(C'>, it uses that variable instead of the global one, but " |
| 1540 |
"it's still localized to the loop. This implicit localization occurs I<only> " |
| 1541 |
"for non C-style loops." |
| 1542 |
msgstr "" |
| 1543 |
"Pętla CW<foreach> iteruje poprzez normalną wartość listową i przypisuje " |
| 1544 |
"zmiennej \\s-1VAR\\s0 wartość każdego kolejnego elementu listy. Jeśli " |
| 1545 |
"zmienna jest poprzedzona słowem kluczowym CW<my>, to jest ona leksykalnie " |
| 1546 |
"zawężona i widzialna tylko wewnątrz pętli. W przeciwnym wypadku, zmienna " |
| 1547 |
"jest niejawnie lokalna w pętli i, po wyjściu z niej, odzyskuje pierwotną " |
| 1548 |
"wartość. Jeśli zmienna była poprzednio zadeklarowana przez CW<my>, to pętla " |
| 1549 |
"używa tej zmiennej, zamiast zmiennej globalnej, lecz wciąż jest ona lokalna " |
| 1550 |
"w obrębie pętli. (Zauważ, że zmienne o zasięgu leksykalnym mogą być " |
| 1551 |
"przyczyną kłopotów, jeśli wewnątrz pętli masz odwołujące się do nich " |
| 1552 |
"procedury lub deklaracje formatów.)" |
| 1553 |
|
| 1554 |
#. type: IX |
| 1555 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1556 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1557 |
#, fuzzy, no-wrap |
| 1558 |
#| msgid "local" |
| 1559 |
msgid "my local" |
| 1560 |
msgstr "podręcznik użytkownika" |
| 1561 |
|
| 1562 |
#. type: Plain text |
| 1563 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1564 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1565 |
msgid "" |
| 1566 |
"The CW<\\*(C`foreach\\*(C'> keyword is actually a synonym for the " |
| 1567 |
"CW<\\*(C`for\\*(C'> keyword, so you can use either. If VAR is omitted, " |
| 1568 |
"CW<$_> is set to each value." |
| 1569 |
msgstr "" |
| 1570 |
|
| 1571 |
#. type: IX |
| 1572 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1573 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1574 |
#, no-wrap |
| 1575 |
msgid "$_" |
| 1576 |
msgstr "$_" |
| 1577 |
|
| 1578 |
#. type: Plain text |
| 1579 |
#: debian-trixie debian-unstable |
| 1580 |
msgid "" |
| 1581 |
"If any element of LIST is an lvalue, you can modify it by modifying VAR " |
| 1582 |
"inside the loop. Conversely, if any element of LIST is NOT an lvalue, any " |
| 1583 |
"attempt to modify that element will fail. In other words, the " |
| 1584 |
"CW<\\*(C`foreach\\*(C'> loop index variable is an implicit alias for each " |
| 1585 |
"item in the list that you're looping over." |
| 1586 |
msgstr "" |
| 1587 |
|
| 1588 |
#. type: IX |
| 1589 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1590 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1591 |
#, fuzzy, no-wrap |
| 1592 |
#| msgid "B<alias>" |
| 1593 |
msgid "alias" |
| 1594 |
msgstr "B<alias>" |
| 1595 |
|
| 1596 |
#. type: Plain text |
| 1597 |
#: debian-trixie debian-unstable |
| 1598 |
#, fuzzy |
| 1599 |
#| msgid "" |
| 1600 |
#| "If any part of \\s-1LIST\\s0 is an array, CW<foreach> will get very " |
| 1601 |
#| "messed up if you add or remove elements inside the loop, for example with " |
| 1602 |
#| "CW<splice>. So don't do that." |
| 1603 |
msgid "" |
| 1604 |
"If any part of LIST is an array, CW<\\*(C`foreach\\*(C'> will get very " |
| 1605 |
"confused if you add or remove elements within the loop body, for example " |
| 1606 |
"with \\&CW<\\*(C`splice\\*(C'>. So don't do that." |
| 1607 |
msgstr "" |
| 1608 |
"Jeśli dowolna część \\s-1LISTY\\s0 jest tablicą, to CW<foreach> bardzo się " |
| 1609 |
"zmiesza, jeśli wewnątrz pętli dodasz lub usuniesz elementy, na przykład przy " |
| 1610 |
"pomocy CW<splice>. Nie rób więc tego." |
| 1611 |
|
| 1612 |
#. type: IX |
| 1613 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1614 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1615 |
#, no-wrap |
| 1616 |
msgid "splice" |
| 1617 |
msgstr "splice" |
| 1618 |
|
| 1619 |
#. type: Plain text |
| 1620 |
#: debian-trixie debian-unstable |
| 1621 |
#, fuzzy |
| 1622 |
#| msgid "" |
| 1623 |
#| "CW<foreach> probably won't do what you want if \\s-1VAR\\s0 is a special " |
| 1624 |
#| "variable. Don't do that either." |
| 1625 |
msgid "" |
| 1626 |
"\\&CW<\\*(C`foreach\\*(C'> probably won't do what you expect if VAR is a " |
| 1627 |
"tied or other special variable. Don't do that either." |
| 1628 |
msgstr "" |
| 1629 |
"CW<foreach> prawdopodobnie nie zrobi tego, czego oczekujesz, jeśli " |
| 1630 |
"\\s-1VAR\\s0 jest zmienną specjalną. Tego też nie rób." |
| 1631 |
|
| 1632 |
#. type: Plain text |
| 1633 |
#: debian-trixie debian-unstable |
| 1634 |
msgid "" |
| 1635 |
"As of Perl 5.22, there is an experimental variant of this loop that accepts " |
| 1636 |
"a variable preceded by a backslash for VAR, in which case the items in the " |
| 1637 |
"LIST must be references. The backslashed variable will become an alias to " |
| 1638 |
"each referenced item in the LIST, which must be of the correct type. The " |
| 1639 |
"variable needn't be a scalar in this case, and the backslash may be followed " |
| 1640 |
"by CW<\\*(C`my\\*(C'>. To use this form, you must enable the " |
| 1641 |
"CW<\\*(C`refaliasing\\*(C'> feature via CW<\\*(C`use feature\\*(C'>. (See " |
| 1642 |
"feature. See also \"Assigning to References\" in perlref.)" |
| 1643 |
msgstr "" |
| 1644 |
|
| 1645 |
#. type: Plain text |
| 1646 |
#: debian-trixie debian-unstable |
| 1647 |
msgid "" |
| 1648 |
"As of Perl 5.36, you can iterate over multiple values at a time. You can " |
| 1649 |
"only iterate with lexical scalars as the iterator variables - unlike list " |
| 1650 |
"assignment, it's not possible to use CW<\\*(C`undef\\*(C'> to signify a " |
| 1651 |
"value that isn't wanted. This is a limitation of the current " |
| 1652 |
"implementation, and might be changed in the future." |
| 1653 |
msgstr "" |
| 1654 |
|
| 1655 |
#. type: Plain text |
| 1656 |
#: debian-trixie debian-unstable |
| 1657 |
msgid "" |
| 1658 |
"If the size of the LIST is not an exact multiple of the number of iterator " |
| 1659 |
"variables, then on the last iteration the \"excess\" iterator variables are " |
| 1660 |
"aliases to CW<\\*(C`undef\\*(C'>, as if the LIST had CW<\\*(C`, undef\\*(C'> " |
| 1661 |
"appended as many times as needed for its length to become an exact " |
| 1662 |
"multiple. This happens whether LIST is a literal LIST or an array - ie " |
| 1663 |
"arrays are not extended if their size is not a multiple of the iteration " |
| 1664 |
"size, consistent with iterating an array one-at-a-time. As these padding " |
| 1665 |
"elements are not lvalues, attempting to modify them will fail, consistent " |
| 1666 |
"with the behaviour when iterating a list with literal " |
| 1667 |
"CW<\\*(C`undef\\*(C'>s. If this is not the behaviour you desire, then " |
| 1668 |
"before the loop starts either explicitly extend your array to be an exact " |
| 1669 |
"multiple, or explicitly throw an exception." |
| 1670 |
msgstr "" |
| 1671 |
|
| 1672 |
#. type: Plain text |
| 1673 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1674 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1675 |
msgid "Examples:" |
| 1676 |
msgstr "Przykłady:" |
| 1677 |
|
| 1678 |
#. type: Plain text |
| 1679 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1680 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1681 |
#, no-wrap |
| 1682 |
msgid "" |
| 1683 |
"\\& for (@ary) { s/foo/bar/ }\n" |
| 1684 |
"\\&\n" |
| 1685 |
"\\& for my $elem (@elements) {\n" |
| 1686 |
"\\& $elem *= 2;\n" |
| 1687 |
"\\& }\n" |
| 1688 |
"\\&\n" |
| 1689 |
"\\& for $count (reverse(1..10), \"BOOM\") {\n" |
| 1690 |
"\\& print $count, \"\\en\";\n" |
| 1691 |
"\\& sleep(1);\n" |
| 1692 |
"\\& }\n" |
| 1693 |
"\\&\n" |
| 1694 |
"\\& for (1..15) { print \"Merry Christmas\\en\"; }\n" |
| 1695 |
"\\&\n" |
| 1696 |
"\\& foreach $item (split(/:[\\e\\e\\en:]*/, $ENV{TERMCAP})) {\n" |
| 1697 |
"\\& print \"Item: $item\\en\";\n" |
| 1698 |
"\\& }\n" |
| 1699 |
"\\&\n" |
| 1700 |
"\\& use feature \"refaliasing\";\n" |
| 1701 |
"\\& no warnings \"experimental::refaliasing\";\n" |
| 1702 |
"\\& foreach \\emy %hash (@array_of_hash_references) {\n" |
| 1703 |
"\\& # do something with each %hash\n" |
| 1704 |
"\\& }\n" |
| 1705 |
"\\&\n" |
| 1706 |
"\\& foreach my ($foo, $bar, $baz) (@list) {\n" |
| 1707 |
"\\& # do something three-at-a-time\n" |
| 1708 |
"\\& }\n" |
| 1709 |
"\\&\n" |
| 1710 |
"\\& foreach my ($key, $value) (%hash) {\n" |
| 1711 |
"\\& # iterate over the hash\n" |
| 1712 |
"\\& # The hash is immediately copied to a flat list before the loop\n" |
| 1713 |
"\\& # starts. The list contains copies of keys but aliases of values.\n" |
| 1714 |
"\\& # This is the same behaviour as for $var (%hash) {...}\n" |
| 1715 |
"\\& }\n" |
| 1716 |
msgstr "" |
| 1717 |
|
| 1718 |
#. type: Plain text |
| 1719 |
#: debian-trixie debian-unstable |
| 1720 |
msgid "Here's how a C programmer might code up a particular algorithm in Perl:" |
| 1721 |
msgstr "Oto, jak programista C mógłby zakodować szczególny algorytm w perlu:" |
| 1722 |
|
| 1723 |
#. type: Plain text |
| 1724 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1725 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1726 |
#, fuzzy, no-wrap |
| 1727 |
#| msgid "\\& for (my $i = 0; $i E<lt> @ary1; $i++) { \\& for (my $j = 0; $j E<lt> @ary2; $j++) { \\& if ($ary1[$i] E<gt> $ary2[$j]) { \\& last; # I can't go outside :-( \\& } \\& $ary1[$i] += $ary2[$j]; \\& } \\& # this is where the last one takes me \\& }" |
| 1728 |
msgid "" |
| 1729 |
"\\& for (my $i = 0; $i E<lt> @ary1; $i++) {\n" |
| 1730 |
"\\& for (my $j = 0; $j E<lt> @ary2; $j++) {\n" |
| 1731 |
"\\& if ($ary1[$i] E<gt> $ary2[$j]) {\n" |
| 1732 |
"\\& last; # can\\*(Aqt go to outer :-(\n" |
| 1733 |
"\\& }\n" |
| 1734 |
"\\& $ary1[$i] += $ary2[$j];\n" |
| 1735 |
"\\& }\n" |
| 1736 |
"\\& # this is where that last takes me\n" |
| 1737 |
"\\& }\n" |
| 1738 |
msgstr "\\& for (my $i = 0; $i E<lt> @ary1; $i++) { \\& for (my $j = 0; $j E<lt> @ary2; $j++) { \\& if ($ary1[$i] E<gt> $ary2[$j]) { \\& last; # nie mogę wyjść do zewnętrznej :-( \\& } \\& $ary1[$i] += $ary2[$j]; \\& } \\& # tu zabiera mnie last \\& }" |
| 1739 |
|
| 1740 |
#. type: Plain text |
| 1741 |
#: debian-trixie debian-unstable |
| 1742 |
msgid "" |
| 1743 |
"Whereas here's how a Perl programmer more comfortable with the idiom might " |
| 1744 |
"do it:" |
| 1745 |
msgstr "" |
| 1746 |
|
| 1747 |
#. type: Plain text |
| 1748 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1749 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1750 |
#, fuzzy, no-wrap |
| 1751 |
#| msgid "\\& OUTER: foreach my $wid (@ary1) { \\& INNER: foreach my $jet (@ary2) { \\& next OUTER if $wid E<gt> $jet; \\& $wid += $jet; \\& } \\& }" |
| 1752 |
msgid "" |
| 1753 |
"\\& OUTER: for my $wid (@ary1) {\n" |
| 1754 |
"\\& INNER: for my $jet (@ary2) {\n" |
| 1755 |
"\\& next OUTER if $wid E<gt> $jet;\n" |
| 1756 |
"\\& $wid += $jet;\n" |
| 1757 |
"\\& }\n" |
| 1758 |
"\\& }\n" |
| 1759 |
msgstr "\\& OUTER: foreach my $wid (@ary1) { \\& INNER: foreach my $jet (@ary2) { \\& next OUTER if $wid E<gt> $jet; \\& $wid += $jet; \\& } \\& }" |
| 1760 |
|
| 1761 |
#. type: Plain text |
| 1762 |
#: debian-trixie debian-unstable |
| 1763 |
#, fuzzy |
| 1764 |
#| msgid "" |
| 1765 |
#| "See how simple that is? Cleaner, safer, and faster. It's cleaner because " |
| 1766 |
#| "there's less clutter. It's safer because if code is added between the " |
| 1767 |
#| "inner and outer loops later, it won't be executed by accident. CW<next> " |
| 1768 |
#| "explicitly iterates another loop instead of breaking out of the inner " |
| 1769 |
#| "one. It's faster because Perl executes CW<foreach> statements faster than " |
| 1770 |
#| "the CW<for> equivalent." |
| 1771 |
msgid "" |
| 1772 |
"See how much easier this is? It's cleaner, safer, and faster. It's cleaner " |
| 1773 |
"because it's less noisy. It's safer because if code gets added between the " |
| 1774 |
"inner and outer loops later on, the new code won't be accidentally " |
| 1775 |
"executed. The CW<\\*(C`next\\*(C'> explicitly iterates the other loop " |
| 1776 |
"rather than merely terminating the inner one. And it's faster because Perl " |
| 1777 |
"executes a CW<\\*(C`foreach\\*(C'> statement more rapidly than it would the " |
| 1778 |
"equivalent C-style CW<\\*(C`for\\*(C'> loop." |
| 1779 |
msgstr "" |
| 1780 |
"Widzisz jakie to proste? Czystsze, bezpieczniejsze i szybsze. Jest czystsze, " |
| 1781 |
"bo mniej tu zamieszania. Jest bezpieczniejsze, bo jeśli między wewnętrzną, a " |
| 1782 |
"zewnętrzną pętlę zostanie później dodany kod, to nie będzie on przypadkiem " |
| 1783 |
"wykonywany. CW<next> jawnie iteruje inną pętlę zamiast przerywania " |
| 1784 |
"wewnętrznej. Jest to szybsze, gdyż perl wywołuje instrukcje CW<foreach> " |
| 1785 |
"szybciej niż równoważnik z pętlą CW<for>." |
| 1786 |
|
| 1787 |
#. type: Plain text |
| 1788 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1789 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1790 |
msgid "" |
| 1791 |
"Perceptive Perl hackers may have noticed that a CW<\\*(C`for\\*(C'> loop has " |
| 1792 |
"a return value, and that this value can be captured by wrapping the loop in " |
| 1793 |
"a CW<\\*(C`do\\*(C'> block. The reward for this discovery is this " |
| 1794 |
"cautionary advice: The return value of a CW<\\*(C`for\\*(C'> loop is " |
| 1795 |
"unspecified and may change without notice. Do not rely on it." |
| 1796 |
msgstr "" |
| 1797 |
|
| 1798 |
#. type: IX |
| 1799 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1800 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1801 |
#, no-wrap |
| 1802 |
msgid "Try Catch Exception Handling" |
| 1803 |
msgstr "" |
| 1804 |
|
| 1805 |
#. type: IX |
| 1806 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1807 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1808 |
#, no-wrap |
| 1809 |
msgid "try catch finally" |
| 1810 |
msgstr "" |
| 1811 |
|
| 1812 |
#. type: Plain text |
| 1813 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1814 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1815 |
msgid "" |
| 1816 |
"The CW<\\*(C`try\\*(C'>/CW<\\*(C`catch\\*(C'> syntax provides control flow " |
| 1817 |
"relating to exception handling. The CW<\\*(C`try\\*(C'> keyword introduces a " |
| 1818 |
"block which will be executed when it is encountered, and the " |
| 1819 |
"CW<\\*(C`catch\\*(C'> block provides code to handle any exception that may " |
| 1820 |
"be thrown by the first." |
| 1821 |
msgstr "" |
| 1822 |
|
| 1823 |
#. type: Plain text |
| 1824 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1825 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1826 |
msgid "" |
| 1827 |
"This syntax must first be enabled with CW<\\*(C`use feature " |
| 1828 |
"\\*(Aqtry\\*(Aq\\*(C'>." |
| 1829 |
msgstr "" |
| 1830 |
|
| 1831 |
#. type: Plain text |
| 1832 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1833 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1834 |
#, no-wrap |
| 1835 |
msgid "" |
| 1836 |
"\\& use feature \\*(Aqtry\\*(Aq;\n" |
| 1837 |
"\\&\n" |
| 1838 |
"\\& try {\n" |
| 1839 |
"\\& my $x = call_a_function();\n" |
| 1840 |
"\\& $x E<lt> 100 or die \"Too big\";\n" |
| 1841 |
"\\& send_output($x);\n" |
| 1842 |
"\\& }\n" |
| 1843 |
"\\& catch ($e) {\n" |
| 1844 |
"\\& warn \"Unable to output a value; $e\";\n" |
| 1845 |
"\\& }\n" |
| 1846 |
"\\& print \"Finished\\en\";\n" |
| 1847 |
msgstr "" |
| 1848 |
|
| 1849 |
#. type: Plain text |
| 1850 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1851 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1852 |
msgid "" |
| 1853 |
"Here, the body of the CW<\\*(C`catch\\*(C'> block (i.e. the " |
| 1854 |
"CW<\\*(C`warn\\*(C'> statement) will be executed if the initial block " |
| 1855 |
"invokes the conditional CW<\\*(C`die\\*(C'>, or if either of the functions " |
| 1856 |
"it invokes throws an uncaught exception. The CW<\\*(C`catch\\*(C'> block can " |
| 1857 |
"inspect the CW<$e> lexical variable in this case to see what the exception " |
| 1858 |
"was. If no exception was thrown then the CW<\\*(C`catch\\*(C'> block does " |
| 1859 |
"not happen. In either case, execution will then continue from the following " |
| 1860 |
"statement - in this example the CW<\\*(C`print\\*(C'>." |
| 1861 |
msgstr "" |
| 1862 |
|
| 1863 |
#. type: Plain text |
| 1864 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1865 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1866 |
msgid "" |
| 1867 |
"The CW<\\*(C`catch\\*(C'> keyword must be immediately followed by a variable " |
| 1868 |
"declaration in parentheses, which introduces a new variable visible to the " |
| 1869 |
"body of the subsequent block. Inside the block this variable will contain " |
| 1870 |
"the exception value that was thrown by the code in the CW<\\*(C`try\\*(C'> " |
| 1871 |
"block. It is not necessary to use the CW<\\*(C`my\\*(C'> keyword to declare " |
| 1872 |
"this variable; this is implied (similar as it is for subroutine signatures)." |
| 1873 |
msgstr "" |
| 1874 |
|
| 1875 |
#. type: Plain text |
| 1876 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1877 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1878 |
msgid "" |
| 1879 |
"Both the CW<\\*(C`try\\*(C'> and the CW<\\*(C`catch\\*(C'> blocks are " |
| 1880 |
"permitted to contain control-flow expressions, such as " |
| 1881 |
"CW<\\*(C`return\\*(C'>, CW<\\*(C`goto\\*(C'>, or CW<\\*(C`next\\*(C'>/" |
| 1882 |
"CW<\\*(C`last\\*(C'>/CW<\\*(C`redo\\*(C'>. In all cases they behave as " |
| 1883 |
"expected without warnings. In particular, a CW<\\*(C`return\\*(C'> " |
| 1884 |
"expression inside the CW<\\*(C`try\\*(C'> block will make its entire " |
| 1885 |
"containing function return - this is in contrast to its behaviour inside an " |
| 1886 |
"CW<\\*(C`eval\\*(C'> block, where it would only make that block return." |
| 1887 |
msgstr "" |
| 1888 |
|
| 1889 |
#. type: Plain text |
| 1890 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1891 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1892 |
msgid "" |
| 1893 |
"Like other control-flow syntax, CW<\\*(C`try\\*(C'> and " |
| 1894 |
"CW<\\*(C`catch\\*(C'> will yield the last evaluated value when placed as the " |
| 1895 |
"final statement in a function or a CW<\\*(C`do\\*(C'> block. This permits " |
| 1896 |
"the syntax to be used to create a value. In this case remember not to use " |
| 1897 |
"the CW<\\*(C`return\\*(C'> expression, or that will cause the containing " |
| 1898 |
"function to return." |
| 1899 |
msgstr "" |
| 1900 |
|
| 1901 |
#. type: Plain text |
| 1902 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1903 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1904 |
#, no-wrap |
| 1905 |
msgid "" |
| 1906 |
"\\& my $value = do {\n" |
| 1907 |
"\\& try {\n" |
| 1908 |
"\\& get_thing(@args);\n" |
| 1909 |
"\\& }\n" |
| 1910 |
"\\& catch ($e) {\n" |
| 1911 |
"\\& warn \"Unable to get thing - $e\";\n" |
| 1912 |
"\\& $DEFAULT_THING;\n" |
| 1913 |
"\\& }\n" |
| 1914 |
"\\& };\n" |
| 1915 |
msgstr "" |
| 1916 |
|
| 1917 |
#. type: Plain text |
| 1918 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1919 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1920 |
msgid "" |
| 1921 |
"As with other control-flow syntax, CW<\\*(C`try\\*(C'> blocks are not " |
| 1922 |
"visible to \\&CW<caller()> (just as for example, CW<\\*(C`while\\*(C'> or " |
| 1923 |
"CW<\\*(C`foreach\\*(C'> loops are not). Successive levels of the " |
| 1924 |
"CW<\\*(C`caller\\*(C'> result can see subroutine calls and " |
| 1925 |
"\\&CW<\\*(C`eval\\*(C'> blocks, because those affect the way that " |
| 1926 |
"CW<\\*(C`return\\*(C'> would work. Since \\&CW<\\*(C`try\\*(C'> blocks do " |
| 1927 |
"not intercept CW<\\*(C`return\\*(C'>, they are not of interest to " |
| 1928 |
"\\&CW<\\*(C`caller\\*(C'>." |
| 1929 |
msgstr "" |
| 1930 |
|
| 1931 |
#. type: Plain text |
| 1932 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1933 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1934 |
msgid "" |
| 1935 |
"The CW<\\*(C`try\\*(C'> and CW<\\*(C`catch\\*(C'> blocks may optionally be " |
| 1936 |
"followed by a third block introduced by the CW<\\*(C`finally\\*(C'> keyword. " |
| 1937 |
"This third block is executed after the rest of the construct has finished." |
| 1938 |
msgstr "" |
| 1939 |
|
| 1940 |
#. type: Plain text |
| 1941 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1942 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1943 |
#, no-wrap |
| 1944 |
msgid "" |
| 1945 |
"\\& try {\n" |
| 1946 |
"\\& call_a_function();\n" |
| 1947 |
"\\& }\n" |
| 1948 |
"\\& catch ($e) {\n" |
| 1949 |
"\\& warn \"Unable to call; $e\";\n" |
| 1950 |
"\\& }\n" |
| 1951 |
"\\& finally {\n" |
| 1952 |
"\\& print \"Finished\\en\";\n" |
| 1953 |
"\\& }\n" |
| 1954 |
msgstr "" |
| 1955 |
|
| 1956 |
#. type: Plain text |
| 1957 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1958 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1959 |
msgid "" |
| 1960 |
"The CW<\\*(C`finally\\*(C'> block is equivalent to using a " |
| 1961 |
"CW<\\*(C`defer\\*(C'> block and will be invoked in the same situations; " |
| 1962 |
"whether the CW<\\*(C`try\\*(C'> block completes successfully, throws an " |
| 1963 |
"exception, or transfers control elsewhere by using " |
| 1964 |
"\\&CW<\\*(C`return\\*(C'>, a loop control, or CW<\\*(C`goto\\*(C'>." |
| 1965 |
msgstr "" |
| 1966 |
|
| 1967 |
#. type: Plain text |
| 1968 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1969 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1970 |
msgid "" |
| 1971 |
"Unlike the CW<\\*(C`try\\*(C'> and CW<\\*(C`catch\\*(C'> blocks, a " |
| 1972 |
"CW<\\*(C`finally\\*(C'> block is not permitted to \\&CW<\\*(C`return\\*(C'>, " |
| 1973 |
"CW<\\*(C`goto\\*(C'> or use any loop controls. The final expression value is " |
| 1974 |
"ignored, and does not affect the return value of the containing function " |
| 1975 |
"even if it is placed last in the function." |
| 1976 |
msgstr "" |
| 1977 |
|
| 1978 |
#. type: Plain text |
| 1979 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1980 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1981 |
msgid "" |
| 1982 |
"Use of this CW<\\*(C`finally\\*(C'> block syntax is currently experimental " |
| 1983 |
"and will emit a warning in the CW<\\*(C`experimental::try\\*(C'> category." |
| 1984 |
msgstr "" |
| 1985 |
|
| 1986 |
#. type: IX |
| 1987 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1988 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1989 |
#, no-wrap |
| 1990 |
msgid "Basic BLOCKs" |
| 1991 |
msgstr "" |
| 1992 |
|
| 1993 |
#. type: IX |
| 1994 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 1995 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1996 |
#, no-wrap |
| 1997 |
msgid "block" |
| 1998 |
msgstr "block" |
| 1999 |
|
| 2000 |
#. type: Plain text |
| 2001 |
#: debian-trixie debian-unstable |
| 2002 |
#, fuzzy |
| 2003 |
#| msgid "" |
| 2004 |
#| "\\s-1BLOCK\\s0 (with or without a label) is equivalent to a loop that " |
| 2005 |
#| "executes once. So you can use loop control statements inside the block to " |
| 2006 |
#| "exit or re-execute it. (Note that this is not true inside CW<eval{}>, " |
| 2007 |
#| "CW<sub{}> or, contrary to popular belief, CW<do{}> blocks, which are not " |
| 2008 |
#| "loops.) The CW<continue> block is optional." |
| 2009 |
msgid "" |
| 2010 |
"A BLOCK by itself (labeled or not) is semantically equivalent to a loop that " |
| 2011 |
"executes once. Thus you can use any of the loop control statements in it to " |
| 2012 |
"leave or restart the block. (Note that this is \\&I<NOT> true in " |
| 2013 |
"CW<\\*(C`eval{}\\*(C'>, CW<\\*(C`sub{}\\*(C'>, or contrary to popular belief " |
| 2014 |
"\\&CW<\\*(C`do{}\\*(C'> blocks, which do I<NOT> count as loops.) The " |
| 2015 |
"CW<\\*(C`continue\\*(C'> block is optional." |
| 2016 |
msgstr "" |
| 2017 |
"\\s-1BLOK\\s0 (z etykietą lub bez) jest równoważny pętli, która jest " |
| 2018 |
"wykonywana jeden raz. Tak więc możesz wewnątrz używać instrukcji kontroli " |
| 2019 |
"pętli by wyjść z bloku lub ponowić jego wykonanie. (Zauważ, że nie jest to " |
| 2020 |
"prawdą wewnątrz CW<eval{}>, CW<sub{}> czy, przeciwnie do rozpowszchnionych " |
| 2021 |
"przekonań, bloków CW<do{}>, które nie zaliczają się do pętli.) Blok " |
| 2022 |
"CW<continue> jest opcjonalny." |
| 2023 |
|
| 2024 |
#. type: Plain text |
| 2025 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2026 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2027 |
#, fuzzy |
| 2028 |
#| msgid "" |
| 2029 |
#| "The \\s-1BLOCK\\s0 construction is particularly convenient for creating " |
| 2030 |
#| "selection (case) structures." |
| 2031 |
msgid "The BLOCK construct can be used to emulate case structures." |
| 2032 |
msgstr "" |
| 2033 |
"Konstrukcja \\s-1BLOKU\\s0 jest szczególnie wygodna do tworzenia struktur " |
| 2034 |
"wyboru (case)." |
| 2035 |
|
| 2036 |
#. type: Plain text |
| 2037 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2038 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2039 |
#, no-wrap |
| 2040 |
msgid "" |
| 2041 |
"\\& SWITCH: {\n" |
| 2042 |
"\\& if (/^abc/) { $abc = 1; last SWITCH; }\n" |
| 2043 |
"\\& if (/^def/) { $def = 1; last SWITCH; }\n" |
| 2044 |
"\\& if (/^xyz/) { $xyz = 1; last SWITCH; }\n" |
| 2045 |
"\\& $nothing = 1;\n" |
| 2046 |
"\\& }\n" |
| 2047 |
msgstr "" |
| 2048 |
"\\& SWITCH: {\n" |
| 2049 |
"\\& if (/^abc/) { $abc = 1; last SWITCH; }\n" |
| 2050 |
"\\& if (/^def/) { $def = 1; last SWITCH; }\n" |
| 2051 |
"\\& if (/^xyz/) { $xyz = 1; last SWITCH; }\n" |
| 2052 |
"\\& $nothing = 1;\n" |
| 2053 |
"\\& }\n" |
| 2054 |
|
| 2055 |
#. type: Plain text |
| 2056 |
#: debian-trixie debian-unstable |
| 2057 |
msgid "" |
| 2058 |
"You'll also find that CW<\\*(C`foreach\\*(C'> loop used to create a " |
| 2059 |
"topicalizer and a switch:" |
| 2060 |
msgstr "" |
| 2061 |
|
| 2062 |
#. type: Plain text |
| 2063 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2064 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2065 |
#, no-wrap |
| 2066 |
msgid "" |
| 2067 |
"\\& SWITCH:\n" |
| 2068 |
"\\& for ($var) {\n" |
| 2069 |
"\\& if (/^abc/) { $abc = 1; last SWITCH; }\n" |
| 2070 |
"\\& if (/^def/) { $def = 1; last SWITCH; }\n" |
| 2071 |
"\\& if (/^xyz/) { $xyz = 1; last SWITCH; }\n" |
| 2072 |
"\\& $nothing = 1;\n" |
| 2073 |
"\\& }\n" |
| 2074 |
msgstr "" |
| 2075 |
"\\& SWITCH:\n" |
| 2076 |
"\\& for ($var) {\n" |
| 2077 |
"\\& if (/^abc/) { $abc = 1; last SWITCH; }\n" |
| 2078 |
"\\& if (/^def/) { $def = 1; last SWITCH; }\n" |
| 2079 |
"\\& if (/^xyz/) { $xyz = 1; last SWITCH; }\n" |
| 2080 |
"\\& $nothing = 1;\n" |
| 2081 |
"\\& }\n" |
| 2082 |
|
| 2083 |
#. type: Plain text |
| 2084 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2085 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2086 |
msgid "" |
| 2087 |
"Such constructs are quite frequently used, both because older versions of " |
| 2088 |
"Perl had no official CW<\\*(C`switch\\*(C'> statement, and also because the " |
| 2089 |
"new version described immediately below remains experimental and can " |
| 2090 |
"sometimes be confusing." |
| 2091 |
msgstr "" |
| 2092 |
|
| 2093 |
#. type: IX |
| 2094 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2095 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2096 |
#, no-wrap |
| 2097 |
msgid "defer blocks" |
| 2098 |
msgstr "" |
| 2099 |
|
| 2100 |
#. type: IX |
| 2101 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2102 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2103 |
#, no-wrap |
| 2104 |
msgid "defer" |
| 2105 |
msgstr "defer" |
| 2106 |
|
| 2107 |
#. type: Plain text |
| 2108 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2109 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2110 |
msgid "" |
| 2111 |
"A block prefixed by the CW<\\*(C`defer\\*(C'> modifier provides a section of " |
| 2112 |
"code which runs at a later time during scope exit." |
| 2113 |
msgstr "" |
| 2114 |
|
| 2115 |
#. type: Plain text |
| 2116 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2117 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2118 |
msgid "" |
| 2119 |
"A CW<\\*(C`defer\\*(C'> block can appear at any point where a regular block " |
| 2120 |
"or other statement is permitted. If the flow of execution reaches this " |
| 2121 |
"statement, the body of the block is stored for later, but not invoked " |
| 2122 |
"immediately. When the flow of control leaves the containing block for any " |
| 2123 |
"reason, this stored block is executed on the way past. It provides a means " |
| 2124 |
"of deferring execution until a later time. This acts similarly to syntax " |
| 2125 |
"provided by some other languages, often using keywords named CW<\\*(C`try / " |
| 2126 |
"finally\\*(C'>." |
| 2127 |
msgstr "" |
| 2128 |
|
| 2129 |
#. type: Plain text |
| 2130 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2131 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2132 |
msgid "" |
| 2133 |
"This syntax is available since Perl 5.36 if enabled by the " |
| 2134 |
"CW<\\*(C`defer\\*(C'> named feature, and is currently experimental. If " |
| 2135 |
"experimental warnings are enabled it will emit a warning when used." |
| 2136 |
msgstr "" |
| 2137 |
|
| 2138 |
#. type: Plain text |
| 2139 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2140 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2141 |
#, no-wrap |
| 2142 |
msgid "" |
| 2143 |
"\\& use feature \\*(Aqdefer\\*(Aq;\n" |
| 2144 |
"\\&\n" |
| 2145 |
"\\& {\n" |
| 2146 |
"\\& say \"This happens first\";\n" |
| 2147 |
"\\& defer { say \"This happens last\"; }\n" |
| 2148 |
"\\&\n" |
| 2149 |
"\\& say \"And this happens inbetween\";\n" |
| 2150 |
"\\& }\n" |
| 2151 |
msgstr "" |
| 2152 |
|
| 2153 |
#. type: Plain text |
| 2154 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2155 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2156 |
msgid "" |
| 2157 |
"If multiple CW<\\*(C`defer\\*(C'> blocks are contained in a single scope, " |
| 2158 |
"they are executed in LIFO order; the last one reached is the first one " |
| 2159 |
"executed." |
| 2160 |
msgstr "" |
| 2161 |
|
| 2162 |
#. type: Plain text |
| 2163 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2164 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2165 |
msgid "" |
| 2166 |
"The code stored by the CW<\\*(C`defer\\*(C'> block will be invoked when " |
| 2167 |
"control leaves its containing block due to regular fallthrough, explicit " |
| 2168 |
"CW<\\*(C`return\\*(C'>, exceptions thrown by CW<\\*(C`die\\*(C'> or " |
| 2169 |
"propagated by functions called by it, CW<\\*(C`goto\\*(C'>, or any of the " |
| 2170 |
"loop control statements CW<\\*(C`next\\*(C'>, CW<\\*(C`last\\*(C'> or " |
| 2171 |
"CW<\\*(C`redo\\*(C'>." |
| 2172 |
msgstr "" |
| 2173 |
|
| 2174 |
#. type: Plain text |
| 2175 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2176 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2177 |
msgid "" |
| 2178 |
"If the flow of control does not reach the CW<\\*(C`defer\\*(C'> statement " |
| 2179 |
"itself then its body is not stored for later execution. (This is in direct " |
| 2180 |
"contrast to the code provided by an CW<\\*(C`END\\*(C'> phaser block, which " |
| 2181 |
"is always enqueued by the compiler, regardless of whether execution ever " |
| 2182 |
"reached the line it was given on.)" |
| 2183 |
msgstr "" |
| 2184 |
|
| 2185 |
#. type: Plain text |
| 2186 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2187 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2188 |
#, no-wrap |
| 2189 |
msgid "" |
| 2190 |
"\\& use feature \\*(Aqdefer\\*(Aq;\n" |
| 2191 |
"\\&\n" |
| 2192 |
"\\& {\n" |
| 2193 |
"\\& defer { say \"This will run\"; }\n" |
| 2194 |
"\\& return;\n" |
| 2195 |
"\\& defer { say \"This will not\"; }\n" |
| 2196 |
"\\& }\n" |
| 2197 |
msgstr "" |
| 2198 |
|
| 2199 |
#. type: Plain text |
| 2200 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2201 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2202 |
msgid "" |
| 2203 |
"Exceptions thrown by code inside a CW<\\*(C`defer\\*(C'> block will " |
| 2204 |
"propagate to the caller in the same way as any other exception thrown by " |
| 2205 |
"normal code." |
| 2206 |
msgstr "" |
| 2207 |
|
| 2208 |
#. type: Plain text |
| 2209 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2210 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2211 |
msgid "" |
| 2212 |
"If the CW<\\*(C`defer\\*(C'> block is being executed due to a thrown " |
| 2213 |
"exception and throws another one it is not specified what happens, beyond " |
| 2214 |
"that the caller will definitely receive an exception." |
| 2215 |
msgstr "" |
| 2216 |
|
| 2217 |
#. type: Plain text |
| 2218 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2219 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2220 |
msgid "" |
| 2221 |
"Besides throwing an exception, a CW<\\*(C`defer\\*(C'> block is not " |
| 2222 |
"permitted to otherwise alter the control flow of its surrounding code. In " |
| 2223 |
"particular, it may not cause its containing function to " |
| 2224 |
"CW<\\*(C`return\\*(C'>, nor may it CW<\\*(C`goto\\*(C'> a label, or control " |
| 2225 |
"a containing loop using CW<\\*(C`next\\*(C'>, CW<\\*(C`last\\*(C'> or " |
| 2226 |
"CW<\\*(C`redo\\*(C'>. These constructions are however, permitted entirely " |
| 2227 |
"within the body of the \\&CW<\\*(C`defer\\*(C'>." |
| 2228 |
msgstr "" |
| 2229 |
|
| 2230 |
#. type: Plain text |
| 2231 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2232 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2233 |
#, no-wrap |
| 2234 |
msgid "" |
| 2235 |
"\\& use feature \\*(Aqdefer\\*(Aq;\n" |
| 2236 |
"\\&\n" |
| 2237 |
"\\& {\n" |
| 2238 |
"\\& defer {\n" |
| 2239 |
"\\& foreach ( 1 .. 5 ) {\n" |
| 2240 |
"\\& last if $_ == 3; # this is permitted\n" |
| 2241 |
"\\& }\n" |
| 2242 |
"\\& }\n" |
| 2243 |
"\\& }\n" |
| 2244 |
"\\&\n" |
| 2245 |
"\\& {\n" |
| 2246 |
"\\& foreach ( 6 .. 10 ) {\n" |
| 2247 |
"\\& defer {\n" |
| 2248 |
"\\& last if $_ == 8; # this is not\n" |
| 2249 |
"\\& }\n" |
| 2250 |
"\\& }\n" |
| 2251 |
"\\& }\n" |
| 2252 |
msgstr "" |
| 2253 |
|
| 2254 |
#. type: IX |
| 2255 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2256 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2257 |
#, fuzzy, no-wrap |
| 2258 |
#| msgid "Basic BLOCK and switch statements" |
| 2259 |
msgid "Switch Statements" |
| 2260 |
msgstr "Podstawowe instrukcje BLOKOWE i switch" |
| 2261 |
|
| 2262 |
#. type: IX |
| 2263 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2264 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2265 |
#, no-wrap |
| 2266 |
msgid "switch case given when default" |
| 2267 |
msgstr "" |
| 2268 |
|
| 2269 |
#. type: Plain text |
| 2270 |
#: debian-trixie debian-unstable |
| 2271 |
msgid "" |
| 2272 |
"Starting from Perl 5.10.1 (well, 5.10.0, but it didn't work right), you can " |
| 2273 |
"say" |
| 2274 |
msgstr "" |
| 2275 |
|
| 2276 |
#. type: Plain text |
| 2277 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2278 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2279 |
#, no-wrap |
| 2280 |
msgid "\\& use feature \"switch\";\n" |
| 2281 |
msgstr "" |
| 2282 |
|
| 2283 |
#. type: Plain text |
| 2284 |
#: debian-trixie debian-unstable |
| 2285 |
msgid "" |
| 2286 |
"to enable an experimental switch feature. This is loosely based on an old " |
| 2287 |
"version of a Raku proposal, but it no longer resembles the Raku construct. " |
| 2288 |
"You also get the switch feature whenever you declare that your code prefers " |
| 2289 |
"to run under a version of Perl between 5.10 and 5.34. For example:" |
| 2290 |
msgstr "" |
| 2291 |
|
| 2292 |
#. type: Plain text |
| 2293 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2294 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2295 |
#, no-wrap |
| 2296 |
msgid "\\& use v5.14;\n" |
| 2297 |
msgstr "\\& use v5.14;\n" |
| 2298 |
|
| 2299 |
#. type: Plain text |
| 2300 |
#: debian-trixie debian-unstable |
| 2301 |
msgid "" |
| 2302 |
"Under the \"switch\" feature, Perl gains the experimental keywords " |
| 2303 |
"\\&CW<\\*(C`given\\*(C'>, CW<\\*(C`when\\*(C'>, CW<\\*(C`default\\*(C'>, " |
| 2304 |
"CW<\\*(C`continue\\*(C'>, and CW<\\*(C`break\\*(C'>. Starting from Perl " |
| 2305 |
"5.16, one can prefix the switch keywords with CW<\\*(C`CORE::\\*(C'> to " |
| 2306 |
"access the feature without a CW<\\*(C`use feature\\*(C'> statement. The " |
| 2307 |
"keywords CW<\\*(C`given\\*(C'> and \\&CW<\\*(C`when\\*(C'> are analogous to " |
| 2308 |
"CW<\\*(C`switch\\*(C'> and \\&CW<\\*(C`case\\*(C'> in other languages -- " |
| 2309 |
"though CW<\\*(C`continue\\*(C'> is not -- so the code in the previous " |
| 2310 |
"section could be rewritten as" |
| 2311 |
msgstr "" |
| 2312 |
|
| 2313 |
#. type: Plain text |
| 2314 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2315 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2316 |
#, no-wrap |
| 2317 |
msgid "" |
| 2318 |
"\\& use v5.10.1;\n" |
| 2319 |
"\\& for ($var) {\n" |
| 2320 |
"\\& when (/^abc/) { $abc = 1 }\n" |
| 2321 |
"\\& when (/^def/) { $def = 1 }\n" |
| 2322 |
"\\& when (/^xyz/) { $xyz = 1 }\n" |
| 2323 |
"\\& default { $nothing = 1 }\n" |
| 2324 |
"\\& }\n" |
| 2325 |
msgstr "" |
| 2326 |
"\\& use v5.10.1;\n" |
| 2327 |
"\\& for ($var) {\n" |
| 2328 |
"\\& when (/^abc/) { $abc = 1 }\n" |
| 2329 |
"\\& when (/^def/) { $def = 1 }\n" |
| 2330 |
"\\& when (/^xyz/) { $xyz = 1 }\n" |
| 2331 |
"\\& default { $nothing = 1 }\n" |
| 2332 |
"\\& }\n" |
| 2333 |
|
| 2334 |
#. type: Plain text |
| 2335 |
#: debian-trixie debian-unstable |
| 2336 |
msgid "" |
| 2337 |
"The CW<\\*(C`foreach\\*(C'> is the non-experimental way to set a " |
| 2338 |
"topicalizer. If you wish to use the highly experimental " |
| 2339 |
"CW<\\*(C`given\\*(C'>, that could be written like this:" |
| 2340 |
msgstr "" |
| 2341 |
|
| 2342 |
#. type: Plain text |
| 2343 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2344 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2345 |
#, no-wrap |
| 2346 |
msgid "" |
| 2347 |
"\\& use v5.10.1;\n" |
| 2348 |
"\\& given ($var) {\n" |
| 2349 |
"\\& when (/^abc/) { $abc = 1 }\n" |
| 2350 |
"\\& when (/^def/) { $def = 1 }\n" |
| 2351 |
"\\& when (/^xyz/) { $xyz = 1 }\n" |
| 2352 |
"\\& default { $nothing = 1 }\n" |
| 2353 |
"\\& }\n" |
| 2354 |
msgstr "" |
| 2355 |
"\\& use v5.10.1;\n" |
| 2356 |
"\\& given ($var) {\n" |
| 2357 |
"\\& when (/^abc/) { $abc = 1 }\n" |
| 2358 |
"\\& when (/^def/) { $def = 1 }\n" |
| 2359 |
"\\& when (/^xyz/) { $xyz = 1 }\n" |
| 2360 |
"\\& default { $nothing = 1 }\n" |
| 2361 |
"\\& }\n" |
| 2362 |
|
| 2363 |
#. type: Plain text |
| 2364 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2365 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2366 |
msgid "As of 5.14, that can also be written this way:" |
| 2367 |
msgstr "" |
| 2368 |
|
| 2369 |
#. type: Plain text |
| 2370 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2371 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2372 |
#, no-wrap |
| 2373 |
msgid "" |
| 2374 |
"\\& use v5.14;\n" |
| 2375 |
"\\& for ($var) {\n" |
| 2376 |
"\\& $abc = 1 when /^abc/;\n" |
| 2377 |
"\\& $def = 1 when /^def/;\n" |
| 2378 |
"\\& $xyz = 1 when /^xyz/;\n" |
| 2379 |
"\\& default { $nothing = 1 }\n" |
| 2380 |
"\\& }\n" |
| 2381 |
msgstr "" |
| 2382 |
"\\& use v5.14;\n" |
| 2383 |
"\\& for ($var) {\n" |
| 2384 |
"\\& $abc = 1 when /^abc/;\n" |
| 2385 |
"\\& $def = 1 when /^def/;\n" |
| 2386 |
"\\& $xyz = 1 when /^xyz/;\n" |
| 2387 |
"\\& default { $nothing = 1 }\n" |
| 2388 |
"\\& }\n" |
| 2389 |
|
| 2390 |
#. type: Plain text |
| 2391 |
#: debian-trixie debian-unstable |
| 2392 |
msgid "Or if you don't care to play it safe, like this:" |
| 2393 |
msgstr "" |
| 2394 |
|
| 2395 |
#. type: Plain text |
| 2396 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2397 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2398 |
#, no-wrap |
| 2399 |
msgid "" |
| 2400 |
"\\& use v5.14;\n" |
| 2401 |
"\\& given ($var) {\n" |
| 2402 |
"\\& $abc = 1 when /^abc/;\n" |
| 2403 |
"\\& $def = 1 when /^def/;\n" |
| 2404 |
"\\& $xyz = 1 when /^xyz/;\n" |
| 2405 |
"\\& default { $nothing = 1 }\n" |
| 2406 |
"\\& }\n" |
| 2407 |
msgstr "" |
| 2408 |
"\\& use v5.14;\n" |
| 2409 |
"\\& given ($var) {\n" |
| 2410 |
"\\& $abc = 1 when /^abc/;\n" |
| 2411 |
"\\& $def = 1 when /^def/;\n" |
| 2412 |
"\\& $xyz = 1 when /^xyz/;\n" |
| 2413 |
"\\& default { $nothing = 1 }\n" |
| 2414 |
"\\& }\n" |
| 2415 |
|
| 2416 |
#. type: Plain text |
| 2417 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2418 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2419 |
msgid "" |
| 2420 |
"The arguments to CW<\\*(C`given\\*(C'> and CW<\\*(C`when\\*(C'> are in " |
| 2421 |
"scalar context, and CW<\\*(C`given\\*(C'> assigns the CW<$_> variable its " |
| 2422 |
"topic value." |
| 2423 |
msgstr "" |
| 2424 |
|
| 2425 |
#. type: Plain text |
| 2426 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2427 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2428 |
msgid "" |
| 2429 |
"Exactly what the I<EXPR> argument to CW<\\*(C`when\\*(C'> does is hard to " |
| 2430 |
"describe precisely, but in general, it tries to guess what you want done. " |
| 2431 |
"Sometimes it is interpreted as CW<\\*(C`$_ ~~ >\\f(CIEXPRCW<\\*(C'>, and " |
| 2432 |
"sometimes it is not. It also behaves differently when lexically enclosed by " |
| 2433 |
"a CW<\\*(C`given\\*(C'> block than it does when dynamically enclosed by a " |
| 2434 |
"CW<\\*(C`foreach\\*(C'> loop. The rules are far too difficult to understand " |
| 2435 |
"to be described here. See \"Experimental Details on given and when\" later " |
| 2436 |
"on." |
| 2437 |
msgstr "" |
| 2438 |
|
| 2439 |
#. type: Plain text |
| 2440 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2441 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2442 |
msgid "" |
| 2443 |
"Due to an unfortunate bug in how CW<\\*(C`given\\*(C'> was implemented " |
| 2444 |
"between Perl 5.10 and 5.16, under those implementations the version of " |
| 2445 |
"CW<$_> governed by \\&CW<\\*(C`given\\*(C'> is merely a lexically scoped " |
| 2446 |
"copy of the original, not a dynamically scoped alias to the original, as it " |
| 2447 |
"would be if it were a \\&CW<\\*(C`foreach\\*(C'> or under both the original " |
| 2448 |
"and the current Raku language specification. This bug was fixed in Perl " |
| 2449 |
"5.18 (and lexicalized CW<$_> itself was removed in Perl 5.24)." |
| 2450 |
msgstr "" |
| 2451 |
|
| 2452 |
#. type: Plain text |
| 2453 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2454 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2455 |
msgid "" |
| 2456 |
"If your code still needs to run on older versions, stick to " |
| 2457 |
"CW<\\*(C`foreach\\*(C'> for your topicalizer and you will be less unhappy." |
| 2458 |
msgstr "" |
| 2459 |
|
| 2460 |
#. type: IX |
| 2461 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2462 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2463 |
#, no-wrap |
| 2464 |
msgid "Goto" |
| 2465 |
msgstr "Goto" |
| 2466 |
|
| 2467 |
#. type: IX |
| 2468 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2469 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2470 |
#, no-wrap |
| 2471 |
msgid "goto" |
| 2472 |
msgstr "" |
| 2473 |
|
| 2474 |
#. type: Plain text |
| 2475 |
#: debian-trixie debian-unstable |
| 2476 |
msgid "" |
| 2477 |
"Although not for the faint of heart, Perl does support a " |
| 2478 |
"CW<\\*(C`goto\\*(C'> statement. There are three forms: CW<\\*(C`goto\\*(C'>-" |
| 2479 |
"LABEL, CW<\\*(C`goto\\*(C'>-EXPR, and \\&CW<\\*(C`goto\\*(C'>-&NAME. A " |
| 2480 |
"loop's LABEL is not actually a valid target for a CW<\\*(C`goto\\*(C'>; it's " |
| 2481 |
"just the name of the loop." |
| 2482 |
msgstr "" |
| 2483 |
|
| 2484 |
#. type: Plain text |
| 2485 |
#: debian-trixie debian-unstable |
| 2486 |
#, fuzzy |
| 2487 |
#| msgid "" |
| 2488 |
#| "The form goto-\\s-1LABEL\\s0 looks for the statement marked " |
| 2489 |
#| "\\s-1LABEL\\s0 and continues execution there. It cannot be used to enter " |
| 2490 |
#| "constructs that require initialization, such as procedures or foreach " |
| 2491 |
#| "loops. It also cannot be used to enter constructs that are optimized in " |
| 2492 |
#| "some way. It can be used to enter almost anywhere else in the dynamic " |
| 2493 |
#| "scope, including exiting procedures, but it is usually better to use a " |
| 2494 |
#| "construct like last or die. The author of Perl never felt the need to use " |
| 2495 |
#| "this form of goto (in Perl\\*(--C that's a different matter)." |
| 2496 |
msgid "" |
| 2497 |
"The CW<\\*(C`goto\\*(C'>-LABEL form finds the statement labeled with LABEL " |
| 2498 |
"and resumes execution there. It may not be used to go into any construct " |
| 2499 |
"that requires initialization, such as a subroutine or a " |
| 2500 |
"CW<\\*(C`foreach\\*(C'> loop. It also can't be used to go into a construct " |
| 2501 |
"that is optimized away. It can be used to go almost anywhere else within " |
| 2502 |
"the dynamic scope, including out of subroutines, but it's usually better to " |
| 2503 |
"use some other construct such as CW<\\*(C`last\\*(C'> or " |
| 2504 |
"CW<\\*(C`die\\*(C'>. The author of Perl has never felt the need to use this " |
| 2505 |
"form of CW<\\*(C`goto\\*(C'> (in Perl, that is--C is another matter)." |
| 2506 |
msgstr "" |
| 2507 |
"Postać goto-\\s-1ETYKIETA\\s0 szuka instrukcji oznaczonej \\s-1ETYKIETĄ\\s0 " |
| 2508 |
"i kontynuuje wykonywanie w tym miejscu. Nie może być używana do wchodzenia " |
| 2509 |
"do wnętrza konstrukcji, które wymagają inicjalizacji, takich jak procedury " |
| 2510 |
"lub pętle foreach. Nie może też być używana do wchodzenia do konstrukcji, " |
| 2511 |
"które są w jakiś sposób optymalizowane. Może być używane do wchodzenia " |
| 2512 |
"prawie we wszystkie inne miejsca w zakresie dynamicznym, łącznie z " |
| 2513 |
"wychodzeniem z procedur, lecz zwykle lepiej jest użyć konstrukcji takiej jak " |
| 2514 |
"last lub die. Autor Perla nigdy nie czuł potrzeby używania tej postaci goto " |
| 2515 |
"(w Perlu\\*(--C to inna sprawa)." |
| 2516 |
|
| 2517 |
#. type: Plain text |
| 2518 |
#: debian-trixie debian-unstable |
| 2519 |
#, fuzzy |
| 2520 |
#| msgid "" |
| 2521 |
#| "The form goto-\\s-1EXPR\\s0 expects a label name whose scope will be " |
| 2522 |
#| "resolved dynamically. This allows the use of computed goto's as in " |
| 2523 |
#| "\\s-1FORTRAN\\s0ie, but is not very recommended if you are optimizing for " |
| 2524 |
#| "program maintenance:" |
| 2525 |
msgid "" |
| 2526 |
"The CW<\\*(C`goto\\*(C'>-EXPR form expects a label name, whose scope will be " |
| 2527 |
"resolved dynamically. This allows for computed CW<\\*(C`goto\\*(C'>s per " |
| 2528 |
"FORTRAN, but isn't necessarily recommended if you're optimizing for " |
| 2529 |
"maintainability:" |
| 2530 |
msgstr "" |
| 2531 |
"Postać goto-\\s-1WYRAŻ\\s0 oczekuje nazwy etykiety, której zakres zostanie " |
| 2532 |
"rozwiązany dynamicznie. Umożliwia to stosowanie wyliczanych goto jak w " |
| 2533 |
"\\s-1FORTRAN\\s0ie, lecz nie jest zbyt zalecane jeśli optymalizujesz z uwagi " |
| 2534 |
"na konserwację programu:" |
| 2535 |
|
| 2536 |
#. type: Plain text |
| 2537 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2538 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2539 |
#, no-wrap |
| 2540 |
msgid "\\& goto((\"FOO\", \"BAR\", \"GLARCH\")[$i]);\n" |
| 2541 |
msgstr "\\& goto((\"FOO\", \"BAR\", \"GLARCH\")[$i]);\n" |
| 2542 |
|
| 2543 |
#. type: Plain text |
| 2544 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2545 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2546 |
#, fuzzy |
| 2547 |
#| msgid "" |
| 2548 |
#| "The form goto-&\\s-1NAME\\s0 is very magical and substitutes a call to a " |
| 2549 |
#| "named procedure for the current procedure. This is used by " |
| 2550 |
#| "I<\\s-1AUTOLOAD\\s0()> procedures that want to load other procedures and " |
| 2551 |
#| "then pretend that the other procedure was called first (except that any " |
| 2552 |
#| "modifications CW<@_> in the current procedure are carried over to the " |
| 2553 |
#| "other procedure.) After such a CW<goto>, even I<caller()> will not be " |
| 2554 |
#| "able to tell that this procedure was called first." |
| 2555 |
msgid "" |
| 2556 |
"The CW<\\*(C`goto\\*(C'>-&NAME form is highly magical, and substitutes a " |
| 2557 |
"call to the named subroutine for the currently running subroutine. This is " |
| 2558 |
"used by \\&CW<AUTOLOAD()> subroutines that wish to load another subroutine " |
| 2559 |
"and then pretend that the other subroutine had been called in the first " |
| 2560 |
"place (except that any modifications to CW<@_> in the current subroutine are " |
| 2561 |
"propagated to the other subroutine.) After the CW<\\*(C`goto\\*(C'>, not " |
| 2562 |
"even CW<caller()> will be able to tell that this routine was called first." |
| 2563 |
msgstr "" |
| 2564 |
"Postać goto-&\\s-1NAZWA\\s0 jest bardzo magiczna i podstawia wywołanie do " |
| 2565 |
"nazwanej procedury za bieżącą procedurę. Jest to używane przez procedury " |
| 2566 |
"I<\\s-1AUTOLOAD\\s0()>, które chcą ładować inne procedury, a potem udawać, " |
| 2567 |
"że inna procedura została wywołana jako pierwsza (poza tym, że wszelkie " |
| 2568 |
"modyfikacje CW<@_> w bieżącej procedurrze są przenoszone do tej innej " |
| 2569 |
"procedury.) Po takim CW<goto>, nawet I<caller()> nie będzie w stanie " |
| 2570 |
"powiedzieć, że ta procedura została wywołana pierwsza." |
| 2571 |
|
| 2572 |
#. type: Plain text |
| 2573 |
#: debian-trixie debian-unstable |
| 2574 |
#, fuzzy |
| 2575 |
#| msgid "" |
| 2576 |
#| "In most cases like this, it's usually a much, much better idea to use the " |
| 2577 |
#| "structured flow control mechanisms CW<next>, CW<last>, or CW<redo> rather " |
| 2578 |
#| "than resorting to CW<goto>. For some applications, a pair of CW<eval{}> " |
| 2579 |
#| "and I<die()> for exception processing may also be a reasonable choice." |
| 2580 |
msgid "" |
| 2581 |
"In almost all cases like this, it's usually a far, far better idea to use " |
| 2582 |
"the structured control flow mechanisms of CW<\\*(C`next\\*(C'>, " |
| 2583 |
"CW<\\*(C`last\\*(C'>, or CW<\\*(C`redo\\*(C'> instead of resorting to a " |
| 2584 |
"CW<\\*(C`goto\\*(C'>. For certain applications, the catch and throw pair of " |
| 2585 |
"\\&CW<\\*(C`eval{}\\*(C'> and B<die()> for exception processing can also be " |
| 2586 |
"a prudent approach." |
| 2587 |
msgstr "" |
| 2588 |
"W większości tego typu przypadków, zazwyczaj dużo, dużo lepszym pomysłem " |
| 2589 |
"jest używanie strukturalnych mechanizmów kontroli przepływu CW<next>, " |
| 2590 |
"CW<last> lub CW<redo>, zamiast zwracać się ku CW<goto>. Dla niektórych " |
| 2591 |
"zastosowań, para CW<eval{}> i I<die()>, służąca do przetwarzania wyjątków " |
| 2592 |
"może być też rozsądnym wyjściem." |
| 2593 |
|
| 2594 |
#. type: IX |
| 2595 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2596 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2597 |
#, no-wrap |
| 2598 |
msgid "The Ellipsis Statement" |
| 2599 |
msgstr "" |
| 2600 |
|
| 2601 |
#. type: IX |
| 2602 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2603 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2604 |
#, no-wrap |
| 2605 |
msgid "... ... statement ellipsis operator elliptical statement unimplemented statement unimplemented operator yada-yada yada-yada operator ... operator whatever operator triple-dot operator" |
| 2606 |
msgstr "" |
| 2607 |
|
| 2608 |
#. type: Plain text |
| 2609 |
#: debian-trixie debian-unstable |
| 2610 |
msgid "" |
| 2611 |
"Beginning in Perl 5.12, Perl accepts an ellipsis, \"CW<\\*(C`...\\*(C'>\", " |
| 2612 |
"as a placeholder for code that you haven't implemented yet. When Perl 5.12 " |
| 2613 |
"or later encounters an ellipsis statement, it parses this without error, but " |
| 2614 |
"if and when you should actually try to execute it, Perl throws an exception " |
| 2615 |
"with the text CW<\\*(C`Unimplemented\\*(C'>:" |
| 2616 |
msgstr "" |
| 2617 |
|
| 2618 |
#. type: Plain text |
| 2619 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2620 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2621 |
#, no-wrap |
| 2622 |
msgid "" |
| 2623 |
"\\& use v5.12;\n" |
| 2624 |
"\\& sub unimplemented { ... }\n" |
| 2625 |
"\\& eval { unimplemented() };\n" |
| 2626 |
"\\& if ($@ =~ /^Unimplemented at /) {\n" |
| 2627 |
"\\& say \"I found an ellipsis!\";\n" |
| 2628 |
"\\& }\n" |
| 2629 |
msgstr "" |
| 2630 |
|
| 2631 |
#. type: Plain text |
| 2632 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2633 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2634 |
msgid "" |
| 2635 |
"You can only use the elliptical statement to stand in for a complete " |
| 2636 |
"statement. Syntactically, \"CW<\\*(C`...;\\*(C'>\" is a complete statement, " |
| 2637 |
"but, as with other kinds of semicolon-terminated statement, the semicolon " |
| 2638 |
"may be omitted if \"CW<\\*(C`...\\*(C'>\" appears immediately before a " |
| 2639 |
"closing brace. These examples show how the ellipsis works:" |
| 2640 |
msgstr "" |
| 2641 |
|
| 2642 |
#. type: Plain text |
| 2643 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2644 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2645 |
#, no-wrap |
| 2646 |
msgid "" |
| 2647 |
"\\& use v5.12;\n" |
| 2648 |
"\\& { ... }\n" |
| 2649 |
"\\& sub foo { ... }\n" |
| 2650 |
"\\& ...;\n" |
| 2651 |
"\\& eval { ... };\n" |
| 2652 |
"\\& sub somemeth {\n" |
| 2653 |
"\\& my $self = shift;\n" |
| 2654 |
"\\& ...;\n" |
| 2655 |
"\\& }\n" |
| 2656 |
"\\& $x = do {\n" |
| 2657 |
"\\& my $n;\n" |
| 2658 |
"\\& ...;\n" |
| 2659 |
"\\& say \"Hurrah!\";\n" |
| 2660 |
"\\& $n;\n" |
| 2661 |
"\\& };\n" |
| 2662 |
msgstr "" |
| 2663 |
|
| 2664 |
#. type: Plain text |
| 2665 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2666 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2667 |
msgid "" |
| 2668 |
"The elliptical statement cannot stand in for an expression that is part of a " |
| 2669 |
"larger statement. These examples of attempts to use an ellipsis are syntax " |
| 2670 |
"errors:" |
| 2671 |
msgstr "" |
| 2672 |
|
| 2673 |
#. type: Plain text |
| 2674 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2675 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2676 |
#, no-wrap |
| 2677 |
msgid "" |
| 2678 |
"\\& use v5.12;\n" |
| 2679 |
"\\&\n" |
| 2680 |
"\\& print ...;\n" |
| 2681 |
"\\& open(my $fh, \"E<gt>\", \"/dev/passwd\") or ...;\n" |
| 2682 |
"\\& if ($condition && ... ) { say \"Howdy\" };\n" |
| 2683 |
"\\& ... if $x E<gt> $y;\n" |
| 2684 |
"\\& say \"Cromulent\" if ...;\n" |
| 2685 |
"\\& $flub = 5 + ...;\n" |
| 2686 |
msgstr "" |
| 2687 |
|
| 2688 |
#. type: Plain text |
| 2689 |
#: debian-trixie debian-unstable |
| 2690 |
msgid "" |
| 2691 |
"There are some cases where Perl can't immediately tell the difference " |
| 2692 |
"between an expression and a statement. For instance, the syntax for a block " |
| 2693 |
"and an anonymous hash reference constructor look the same unless there's " |
| 2694 |
"something in the braces to give Perl a hint. The ellipsis is a syntax error " |
| 2695 |
"if Perl doesn't guess that the CW<\\*(C`{ ... }\\*(C'> is a block. Inside " |
| 2696 |
"your block, you can use a CW<\\*(C`;\\*(C'> before the ellipsis to denote " |
| 2697 |
"that the \\&CW<\\*(C`{ ... }\\*(C'> is a block and not a hash reference " |
| 2698 |
"constructor." |
| 2699 |
msgstr "" |
| 2700 |
|
| 2701 |
#. type: Plain text |
| 2702 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2703 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2704 |
msgid "" |
| 2705 |
"Note: Some folks colloquially refer to this bit of punctuation as a \"yada-" |
| 2706 |
"yada\" or \"triple-dot\", but its true name is actually an ellipsis." |
| 2707 |
msgstr "" |
| 2708 |
|
| 2709 |
#. type: IX |
| 2710 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2711 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2712 |
#, no-wrap |
| 2713 |
msgid "PODs: Embedded Documentation" |
| 2714 |
msgstr "PODs: Osadzona dokumentacja" |
| 2715 |
|
| 2716 |
#. type: IX |
| 2717 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2718 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2719 |
#, fuzzy, no-wrap |
| 2720 |
#| msgid "POD: Embedded Documentation" |
| 2721 |
msgid "POD documentation" |
| 2722 |
msgstr "POD: Osadzona dokumentacja" |
| 2723 |
|
| 2724 |
#. type: Plain text |
| 2725 |
#: debian-trixie debian-unstable |
| 2726 |
#, fuzzy |
| 2727 |
#| msgid "" |
| 2728 |
#| "Perl has a mechanism for linking documentation to source code. While " |
| 2729 |
#| "waiting for the start of a new instruction, if the compiler comes across " |
| 2730 |
#| "a line that starts with an equal sign and a word like" |
| 2731 |
msgid "" |
| 2732 |
"Perl has a mechanism for intermixing documentation with source code. While " |
| 2733 |
"it's expecting the beginning of a new statement, if the compiler encounters " |
| 2734 |
"a line that begins with an equal sign and a word, like this" |
| 2735 |
msgstr "" |
| 2736 |
"Perl posiada mechanizm łączenia dokumentacji z kodem źródłowym. Podczas " |
| 2737 |
"oczekiwania początku nowej instrukcji, jeśli kompilator natrafi na linię, " |
| 2738 |
"rozpoczynającą się od znaku równości i słowa, jak" |
| 2739 |
|
| 2740 |
#. type: Plain text |
| 2741 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2742 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2743 |
#, no-wrap |
| 2744 |
msgid "\\& =head1 Here There Be Pods!\n" |
| 2745 |
msgstr "\\& =head1 Here There Be Pods!\n" |
| 2746 |
|
| 2747 |
#. type: Plain text |
| 2748 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2749 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2750 |
#, fuzzy |
| 2751 |
#| msgid "" |
| 2752 |
#| "This text, and the rest of the strings up to and including the line " |
| 2753 |
#| "starting with CW<=cut> will be ignored. The format of the inline text is " |
| 2754 |
#| "described in the B<perlpod>(1) manual page." |
| 2755 |
msgid "" |
| 2756 |
"Then that text and all remaining text up through and including a line " |
| 2757 |
"beginning with CW<\\*(C`=cut\\*(C'> will be ignored. The format of the " |
| 2758 |
"intervening text is described in perlpod." |
| 2759 |
msgstr "" |
| 2760 |
"To ten tekst, oraz reszta napisów, aż do linii, rozpoczynającej się od " |
| 2761 |
"CW<=cut> włącznie zostaną zignorowane. Format tekstu wtrąconego jest opisany " |
| 2762 |
"w podręczniku B<perlpod>(1)." |
| 2763 |
|
| 2764 |
#. type: Plain text |
| 2765 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2766 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2767 |
#, fuzzy |
| 2768 |
#| msgid "This allows you to combine source code and documentation, as in" |
| 2769 |
msgid "" |
| 2770 |
"This allows you to intermix your source code and your documentation text " |
| 2771 |
"freely, as in" |
| 2772 |
msgstr "Umożliwia ci to łączenie kodu źródłowego i dokumentacji, jak w" |
| 2773 |
|
| 2774 |
#. type: Plain text |
| 2775 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2776 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2777 |
#, no-wrap |
| 2778 |
msgid "" |
| 2779 |
"\\& =item snazzle($)\n" |
| 2780 |
"\\&\n" |
| 2781 |
"\\& The snazzle() function will behave in the most spectacular\n" |
| 2782 |
"\\& form that you can possibly imagine, not even excepting\n" |
| 2783 |
"\\& cybernetic pyrotechnics.\n" |
| 2784 |
"\\&\n" |
| 2785 |
"\\& =cut back to the compiler, nuff of this pod stuff!\n" |
| 2786 |
"\\&\n" |
| 2787 |
"\\& sub snazzle($) {\n" |
| 2788 |
"\\& my $thingie = shift;\n" |
| 2789 |
"\\& .........\n" |
| 2790 |
"\\& }\n" |
| 2791 |
msgstr "" |
| 2792 |
|
| 2793 |
#. type: Plain text |
| 2794 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2795 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2796 |
#, fuzzy |
| 2797 |
#| msgid "" |
| 2798 |
#| "Note that pod translators should only look at paragraphs starting with a " |
| 2799 |
#| "pod directive (this makes processing easier), while the compiler knows to " |
| 2800 |
#| "look for pod escape sequences even in the middle of a paragraph. This " |
| 2801 |
#| "means that the following secret text will be ignored by both the compiler " |
| 2802 |
#| "and the translators." |
| 2803 |
msgid "" |
| 2804 |
"Note that pod translators should look at only paragraphs beginning with a " |
| 2805 |
"pod directive (it makes parsing easier), whereas the compiler actually knows " |
| 2806 |
"to look for pod escapes even in the middle of a paragraph. This means that " |
| 2807 |
"the following secret stuff will be ignored by both the compiler and the " |
| 2808 |
"translators." |
| 2809 |
msgstr "" |
| 2810 |
"Zauważ, że translatory pod powinny patrzeć tylko na akapity, rozpoczynające " |
| 2811 |
"się od dyrektywy pod (ułatwia to przetwarzanie), podczas gdy kompilator wie, " |
| 2812 |
"że ma szukać sekwencji specjalnych pod nawet w środku akapitu. Znaczy to, że " |
| 2813 |
"następujący tajny tekst będzie ignorowany zarówno przez kompilator, jak i " |
| 2814 |
"przez translatory." |
| 2815 |
|
| 2816 |
#. type: Plain text |
| 2817 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2818 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2819 |
#, fuzzy, no-wrap |
| 2820 |
#| msgid "\\& $a=3; \\& =tajne rzeczy \\& warn \"Neither POD nor CODE!?\" \\& =cut powrot \\& print \"got $a\\en\";" |
| 2821 |
msgid "" |
| 2822 |
"\\& $x=3;\n" |
| 2823 |
"\\& =secret stuff\n" |
| 2824 |
"\\& warn \"Neither POD nor CODE!?\"\n" |
| 2825 |
"\\& =cut back\n" |
| 2826 |
"\\& print \"got $x\\en\";\n" |
| 2827 |
msgstr "\\& $a=3; \\& =tajne rzeczy \\& warn \"Ani POD ani KOD!?\" \\& =cut powrot \\& print \"got $a\\en\";" |
| 2828 |
|
| 2829 |
#. type: Plain text |
| 2830 |
#: debian-trixie debian-unstable |
| 2831 |
#, fuzzy |
| 2832 |
#| msgid "" |
| 2833 |
#| "You probably shouldn't rely on I<warn()>, \"podized\" forever. Not all " |
| 2834 |
#| "translators behave well at this point, and the compiler may become more " |
| 2835 |
#| "picky." |
| 2836 |
msgid "" |
| 2837 |
"You probably shouldn't rely upon the CW<warn()> being podded out forever. " |
| 2838 |
"Not all pod translators are well-behaved in this regard, and perhaps the " |
| 2839 |
"compiler will become pickier." |
| 2840 |
msgstr "" |
| 2841 |
"Prawdopodobnie nie powinieneś opierać się na I<warn()>, \"wypodowanym\" na " |
| 2842 |
"zawsze. Nie wszystkie translatory zachowują się w tym momencie dobrze i być " |
| 2843 |
"może kompilator stanie się wybredniejszy." |
| 2844 |
|
| 2845 |
#. type: Plain text |
| 2846 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2847 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2848 |
#, fuzzy |
| 2849 |
#| msgid "" |
| 2850 |
#| "Pod directives can also be used to quickly comment out sections of code." |
| 2851 |
msgid "" |
| 2852 |
"One may also use pod directives to quickly comment out a section of code." |
| 2853 |
msgstr "Dyrektyw pod można też używać do szybkiego wykomentowania sekcji kodu." |
| 2854 |
|
| 2855 |
#. type: IX |
| 2856 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2857 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2858 |
#, no-wrap |
| 2859 |
msgid "Plain Old Comments (Not!)" |
| 2860 |
msgstr "Plain Old Comments (Not!)" |
| 2861 |
|
| 2862 |
#. type: IX |
| 2863 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2864 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2865 |
#, no-wrap |
| 2866 |
msgid "comment line # preprocessor eval" |
| 2867 |
msgstr "" |
| 2868 |
|
| 2869 |
#. type: Plain text |
| 2870 |
#: debian-trixie debian-unstable |
| 2871 |
#, fuzzy |
| 2872 |
#| msgid "" |
| 2873 |
#| "Like the C preprocessor, Perl can process line directives. Using them, " |
| 2874 |
#| "you can control Perl's notion of filenames and line numbers in error/" |
| 2875 |
#| "warning messages (especially for strings that are processed with " |
| 2876 |
#| "I<eval()>). The syntax for this mechanism is the same as for most C " |
| 2877 |
#| "preprocessors: it matches the regular expression CW</^#\\es*line\\es+" |
| 2878 |
#| "(\\ed+)\\es*(?:\\es\"([^\"]*)\")?/> with CW<$1>, being the line number, " |
| 2879 |
#| "and CW<$2>, being an optional filename (given in quotes)." |
| 2880 |
msgid "" |
| 2881 |
"Perl can process line directives, much like the C preprocessor. Using this, " |
| 2882 |
"one can control Perl's idea of filenames and line numbers in error or " |
| 2883 |
"warning messages (especially for strings that are processed with " |
| 2884 |
"CW<eval()>). The syntax for this mechanism is almost the same as for most C " |
| 2885 |
"preprocessors: it matches the regular expression" |
| 2886 |
msgstr "" |
| 2887 |
"Podobnie jak preprocesor C, perl może przetwarzać dyrektywy liniowe. Przy " |
| 2888 |
"ich użyciu, można kontrolować perlowe pojęcie nazw plików i numerów linii w " |
| 2889 |
"komunikatach o błędach/ostrzeżeniach (szczególnie dla łańcuchów, które są " |
| 2890 |
"przetwarzane z I<eval()>). Składnia tego mechanizmu jest taka sama dla jak " |
| 2891 |
"dla większości preprocesorów C: dopasowuje wyrażenie regularne CW</" |
| 2892 |
"^#\\es*line\\es+(\\ed+)\\es*(?:\\es\"([^\"]*)\")?/> do CW<$1>, będącego " |
| 2893 |
"numerem linii i CW<$2>, będącego opcjonalną nazwą pliku (podaną w " |
| 2894 |
"cudzysłowach)." |
| 2895 |
|
| 2896 |
#. type: Plain text |
| 2897 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2898 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2899 |
#, no-wrap |
| 2900 |
msgid "" |
| 2901 |
"\\& # example: \\*(Aq# line 42 \"new_filename.plx\"\\*(Aq\n" |
| 2902 |
"\\& /^\\e# \\es*\n" |
| 2903 |
"\\& line \\es+ (\\ed+) \\es*\n" |
| 2904 |
"\\& (?:\\es(\"?)([^\"]+)\\eg2)? \\es*\n" |
| 2905 |
"\\& $/x\n" |
| 2906 |
msgstr "" |
| 2907 |
|
| 2908 |
#. type: Plain text |
| 2909 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2910 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2911 |
msgid "" |
| 2912 |
"with CW<$1> being the line number for the next line, and CW<$3> being the " |
| 2913 |
"optional filename (specified with or without quotes). Note that no " |
| 2914 |
"whitespace may precede the CW<\\*(C`#\\*(C'>, unlike modern C preprocessors." |
| 2915 |
msgstr "" |
| 2916 |
|
| 2917 |
#. type: Plain text |
| 2918 |
#: debian-trixie debian-unstable |
| 2919 |
msgid "" |
| 2920 |
"There is a fairly obvious gotcha included with the line directive: Debuggers " |
| 2921 |
"and profilers will only show the last source line to appear at a particular " |
| 2922 |
"line number in a given file. Care should be taken not to cause line number " |
| 2923 |
"collisions in code you'd like to debug later." |
| 2924 |
msgstr "" |
| 2925 |
|
| 2926 |
#. type: Plain text |
| 2927 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2928 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2929 |
msgid "" |
| 2930 |
"Here are some examples that you should be able to type into your command " |
| 2931 |
"shell:" |
| 2932 |
msgstr "Oto niektóre przykłady, które możesz sprawdzić w swojej powłoce:" |
| 2933 |
|
| 2934 |
#. type: Plain text |
| 2935 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2936 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2937 |
#, no-wrap |
| 2938 |
msgid "" |
| 2939 |
"\\& % perl\n" |
| 2940 |
"\\& # line 200 \"bzzzt\"\n" |
| 2941 |
"\\& # the \\*(Aq#\\*(Aq on the previous line must be the first char on line\n" |
| 2942 |
"\\& die \\*(Aqfoo\\*(Aq;\n" |
| 2943 |
"\\& _\\|_END_\\|_\n" |
| 2944 |
"\\& foo at bzzzt line 201.\n" |
| 2945 |
"\\&\n" |
| 2946 |
"\\& % perl\n" |
| 2947 |
"\\& # line 200 \"bzzzt\"\n" |
| 2948 |
"\\& eval qq[\\en#line 2001 \"\"\\endie \\*(Aqfoo\\*(Aq]; print $@;\n" |
| 2949 |
"\\& _\\|_END_\\|_\n" |
| 2950 |
"\\& foo at - line 2001.\n" |
| 2951 |
"\\&\n" |
| 2952 |
"\\& % perl\n" |
| 2953 |
"\\& eval qq[\\en#line 200 \"foo bar\"\\endie \\*(Aqfoo\\*(Aq]; print $@;\n" |
| 2954 |
"\\& _\\|_END_\\|_\n" |
| 2955 |
"\\& foo at foo bar line 200.\n" |
| 2956 |
"\\&\n" |
| 2957 |
"\\& % perl\n" |
| 2958 |
"\\& # line 345 \"goop\"\n" |
| 2959 |
"\\& eval \"\\en#line \" . _\\|_LINE_\\|_ . \\*(Aq \"\\*(Aq . _\\|_FILE_\\|_ .\"\\e\"\\endie \\*(Aqfoo\\*(Aq\";\n" |
| 2960 |
"\\& print $@;\n" |
| 2961 |
"\\& _\\|_END_\\|_\n" |
| 2962 |
"\\& foo at goop line 345.\n" |
| 2963 |
msgstr "" |
| 2964 |
|
| 2965 |
#. type: IX |
| 2966 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2967 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2968 |
#, no-wrap |
| 2969 |
msgid "Experimental Details on given and when" |
| 2970 |
msgstr "" |
| 2971 |
|
| 2972 |
#. type: Plain text |
| 2973 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2974 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2975 |
msgid "" |
| 2976 |
"As previously mentioned, the \"switch\" feature is considered highly " |
| 2977 |
"experimental (it is also scheduled to be removed in perl 5.42.0); it is " |
| 2978 |
"subject to change with little notice. In particular, " |
| 2979 |
"\\&CW<\\*(C`when\\*(C'> has tricky behaviours that are expected to change to " |
| 2980 |
"become less tricky in the future. Do not rely upon its current " |
| 2981 |
"(mis)implementation. Before Perl 5.18, CW<\\*(C`given\\*(C'> also had " |
| 2982 |
"tricky behaviours that you should still beware of if your code must run on " |
| 2983 |
"older versions of Perl." |
| 2984 |
msgstr "" |
| 2985 |
|
| 2986 |
#. type: Plain text |
| 2987 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2988 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2989 |
msgid "Here is a longer example of CW<\\*(C`given\\*(C'>:" |
| 2990 |
msgstr "" |
| 2991 |
|
| 2992 |
#. type: Plain text |
| 2993 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 2994 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2995 |
#, no-wrap |
| 2996 |
msgid "" |
| 2997 |
"\\& use feature \":5.10\";\n" |
| 2998 |
"\\& given ($foo) {\n" |
| 2999 |
"\\& when (undef) {\n" |
| 3000 |
"\\& say \\*(Aq$foo is undefined\\*(Aq;\n" |
| 3001 |
"\\& }\n" |
| 3002 |
"\\& when (\"foo\") {\n" |
| 3003 |
"\\& say \\*(Aq$foo is the string \"foo\"\\*(Aq;\n" |
| 3004 |
"\\& }\n" |
| 3005 |
"\\& when ([1,3,5,7,9]) {\n" |
| 3006 |
"\\& say \\*(Aq$foo is an odd digit\\*(Aq;\n" |
| 3007 |
"\\& continue; # Fall through\n" |
| 3008 |
"\\& }\n" |
| 3009 |
"\\& when ($_ E<lt> 100) {\n" |
| 3010 |
"\\& say \\*(Aq$foo is numerically less than 100\\*(Aq;\n" |
| 3011 |
"\\& }\n" |
| 3012 |
"\\& when (\\e&complicated_check) {\n" |
| 3013 |
"\\& say \\*(Aqa complicated check for $foo is true\\*(Aq;\n" |
| 3014 |
"\\& }\n" |
| 3015 |
"\\& default {\n" |
| 3016 |
"\\& die q(I don\\*(Aqt know what to do with $foo);\n" |
| 3017 |
"\\& }\n" |
| 3018 |
"\\& }\n" |
| 3019 |
msgstr "" |
| 3020 |
|
| 3021 |
#. type: Plain text |
| 3022 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3023 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3024 |
msgid "" |
| 3025 |
"Before Perl 5.18, CW<given(EXPR)> assigned the value of I<EXPR> to merely a " |
| 3026 |
"lexically scoped \\f(BIcopy\\fR (!) of CW<$_>, not a dynamically scoped " |
| 3027 |
"alias the way CW<\\*(C`foreach\\*(C'> does. That made it similar to" |
| 3028 |
msgstr "" |
| 3029 |
|
| 3030 |
#. type: Plain text |
| 3031 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3032 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3033 |
#, no-wrap |
| 3034 |
msgid "\\& do { my $_ = EXPR; ... }\n" |
| 3035 |
msgstr "\\& do { my $_ = EXPR; ... }\n" |
| 3036 |
|
| 3037 |
#. type: Plain text |
| 3038 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3039 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3040 |
msgid "" |
| 3041 |
"except that the block was automatically broken out of by a successful " |
| 3042 |
"\\&CW<\\*(C`when\\*(C'> or an explicit CW<\\*(C`break\\*(C'>. Because it " |
| 3043 |
"was only a copy, and because it was only lexically scoped, not dynamically " |
| 3044 |
"scoped, you could not do the things with it that you are used to in a " |
| 3045 |
"CW<\\*(C`foreach\\*(C'> loop. In particular, it did not work for arbitrary " |
| 3046 |
"function calls if those functions might try to access CW<$_>. Best stick to " |
| 3047 |
"CW<\\*(C`foreach\\*(C'> for that." |
| 3048 |
msgstr "" |
| 3049 |
|
| 3050 |
#. type: Plain text |
| 3051 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3052 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3053 |
msgid "" |
| 3054 |
"Most of the power comes from the implicit smartmatching that can sometimes " |
| 3055 |
"apply. Most of the time, CW<when(EXPR)> is treated as an implicit " |
| 3056 |
"smartmatch of CW<$_>, that is, CW<\\*(C`$_ ~~ EXPR\\*(C'>. (See " |
| 3057 |
"\"Smartmatch Operator\" in perlop for more information on smartmatching.) " |
| 3058 |
"But when I<EXPR> is one of the 10 exceptional cases (or things like them) " |
| 3059 |
"listed below, it is used directly as a boolean." |
| 3060 |
msgstr "" |
| 3061 |
|
| 3062 |
#. type: IX |
| 3063 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3064 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3065 |
#, no-wrap |
| 3066 |
msgid "1." |
| 3067 |
msgstr "1." |
| 3068 |
|
| 3069 |
#. type: IX |
| 3070 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3071 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3072 |
#, no-wrap |
| 3073 |
msgid "Item" |
| 3074 |
msgstr "" |
| 3075 |
|
| 3076 |
#. type: Plain text |
| 3077 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3078 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3079 |
msgid "A user-defined subroutine call or a method invocation." |
| 3080 |
msgstr "" |
| 3081 |
|
| 3082 |
#. type: IX |
| 3083 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3084 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3085 |
#, no-wrap |
| 3086 |
msgid "2." |
| 3087 |
msgstr "2." |
| 3088 |
|
| 3089 |
#. type: Plain text |
| 3090 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3091 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3092 |
msgid "" |
| 3093 |
"A regular expression match in the form of CW<\\*(C`/REGEX/\\*(C'>, " |
| 3094 |
"CW<\\*(C`$foo =~ /REGEX/\\*(C'>, or CW<\\*(C`$foo =~ EXPR\\*(C'>. Also, a " |
| 3095 |
"negated regular expression match in the form CW<\\*(C`!/REGEX/\\*(C'>, " |
| 3096 |
"CW<\\*(C`$foo !~ /REGEX/\\*(C'>, or CW<\\*(C`$foo !~ EXPR\\*(C'>." |
| 3097 |
msgstr "" |
| 3098 |
|
| 3099 |
#. type: IX |
| 3100 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3101 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3102 |
#, no-wrap |
| 3103 |
msgid "3." |
| 3104 |
msgstr "3." |
| 3105 |
|
| 3106 |
#. type: Plain text |
| 3107 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3108 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3109 |
msgid "" |
| 3110 |
"A smart match that uses an explicit CW<\\*(C`~~\\*(C'> operator, such as " |
| 3111 |
"CW<\\*(C`EXPR ~~ EXPR\\*(C'>." |
| 3112 |
msgstr "" |
| 3113 |
|
| 3114 |
#. type: Plain text |
| 3115 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3116 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3117 |
msgid "" |
| 3118 |
"\\&B<NOTE:> You will often have to use CW<\\*(C`$c ~~ $_\\*(C'> because the " |
| 3119 |
"default case uses CW<\\*(C`$_ ~~ $c\\*(C'> , which is frequently the " |
| 3120 |
"opposite of what you want." |
| 3121 |
msgstr "" |
| 3122 |
|
| 3123 |
#. type: IX |
| 3124 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3125 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3126 |
#, no-wrap |
| 3127 |
msgid "4." |
| 3128 |
msgstr "4." |
| 3129 |
|
| 3130 |
#. type: Plain text |
| 3131 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3132 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3133 |
msgid "" |
| 3134 |
"A boolean comparison operator such as CW<\\*(C`$_ E<lt> 10\\*(C'> or " |
| 3135 |
"CW<\\*(C`$x eq \"abc\"\\*(C'>. The relational operators that this applies " |
| 3136 |
"to are the six numeric comparisons (CW<\\*(C`E<lt>\\*(C'>, " |
| 3137 |
"CW<\\*(C`E<gt>\\*(C'>, CW<\\*(C`E<lt>=\\*(C'>, CW<\\*(C`E<gt>=\\*(C'>, " |
| 3138 |
"CW<\\*(C`==\\*(C'>, and CW<\\*(C`!=\\*(C'>), and the six string comparisons " |
| 3139 |
"(CW<\\*(C`lt\\*(C'>, CW<\\*(C`gt\\*(C'>, CW<\\*(C`le\\*(C'>, " |
| 3140 |
"CW<\\*(C`ge\\*(C'>, CW<\\*(C`eq\\*(C'>, and CW<\\*(C`ne\\*(C'>)." |
| 3141 |
msgstr "" |
| 3142 |
|
| 3143 |
#. type: IX |
| 3144 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3145 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3146 |
#, no-wrap |
| 3147 |
msgid "5." |
| 3148 |
msgstr "5." |
| 3149 |
|
| 3150 |
#. type: Plain text |
| 3151 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3152 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3153 |
msgid "" |
| 3154 |
"At least the three builtin functions CW<defined(...)>, CW<exists(...)>, and " |
| 3155 |
"\\&CW<eof(...)>. We might someday add more of these later if we think of " |
| 3156 |
"them." |
| 3157 |
msgstr "" |
| 3158 |
|
| 3159 |
#. type: IX |
| 3160 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3161 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3162 |
#, no-wrap |
| 3163 |
msgid "6." |
| 3164 |
msgstr "6." |
| 3165 |
|
| 3166 |
#. type: Plain text |
| 3167 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3168 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3169 |
msgid "" |
| 3170 |
"A negated expression, whether CW<\\*(C`!(EXPR)\\*(C'> or CW<not(EXPR)>, or a " |
| 3171 |
"logical exclusive-or, CW<\\*(C`(EXPR1) xor (EXPR2)\\*(C'>. The bitwise " |
| 3172 |
"versions (CW<\\*(C`~\\*(C'> and CW<\\*(C`^\\*(C'>) are not included." |
| 3173 |
msgstr "" |
| 3174 |
|
| 3175 |
#. type: IX |
| 3176 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3177 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3178 |
#, no-wrap |
| 3179 |
msgid "7." |
| 3180 |
msgstr "7." |
| 3181 |
|
| 3182 |
#. type: Plain text |
| 3183 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3184 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3185 |
msgid "" |
| 3186 |
"A filetest operator, with exactly 4 exceptions: CW<\\*(C`-s\\*(C'>, " |
| 3187 |
"CW<\\*(C`-M\\*(C'>, CW<\\*(C`-A\\*(C'>, and \\&CW<\\*(C`-C\\*(C'>, as these " |
| 3188 |
"return numerical values, not boolean ones. The CW<\\*(C`-z\\*(C'> filetest " |
| 3189 |
"operator is not included in the exception list." |
| 3190 |
msgstr "" |
| 3191 |
|
| 3192 |
#. type: IX |
| 3193 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3194 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3195 |
#, no-wrap |
| 3196 |
msgid "8." |
| 3197 |
msgstr "8." |
| 3198 |
|
| 3199 |
#. type: Plain text |
| 3200 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3201 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3202 |
msgid "" |
| 3203 |
"The CW<\\*(C`..\\*(C'> and CW<\\*(C`...\\*(C'> flip-flop operators. Note " |
| 3204 |
"that the CW<\\*(C`...\\*(C'> flip-flop operator is completely different from " |
| 3205 |
"the CW<\\*(C`...\\*(C'> elliptical statement just described." |
| 3206 |
msgstr "" |
| 3207 |
|
| 3208 |
#. type: Plain text |
| 3209 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3210 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3211 |
msgid "" |
| 3212 |
"In those 8 cases above, the value of EXPR is used directly as a boolean, so " |
| 3213 |
"no smartmatching is done. You may think of CW<\\*(C`when\\*(C'> as a " |
| 3214 |
"smartsmartmatch." |
| 3215 |
msgstr "" |
| 3216 |
|
| 3217 |
#. type: Plain text |
| 3218 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3219 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3220 |
msgid "" |
| 3221 |
"Furthermore, Perl inspects the operands of logical operators to decide " |
| 3222 |
"whether to use smartmatching for each one by applying the above test to the " |
| 3223 |
"operands:" |
| 3224 |
msgstr "" |
| 3225 |
|
| 3226 |
#. type: IX |
| 3227 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3228 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3229 |
#, no-wrap |
| 3230 |
msgid "9." |
| 3231 |
msgstr "9." |
| 3232 |
|
| 3233 |
#. type: Plain text |
| 3234 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3235 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3236 |
msgid "" |
| 3237 |
"If EXPR is CW<\\*(C`EXPR1 && EXPR2\\*(C'> or CW<\\*(C`EXPR1 and " |
| 3238 |
"EXPR2\\*(C'>, the test is applied \\&I<recursively> to both EXPR1 and " |
| 3239 |
"EXPR2. Only if I<both> operands also pass the test, I<recursively>, will " |
| 3240 |
"the expression be treated as boolean. Otherwise, smartmatching is used." |
| 3241 |
msgstr "" |
| 3242 |
|
| 3243 |
#. type: IX |
| 3244 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3245 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3246 |
#, no-wrap |
| 3247 |
msgid "10." |
| 3248 |
msgstr "10." |
| 3249 |
|
| 3250 |
#. type: Plain text |
| 3251 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3252 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3253 |
msgid "" |
| 3254 |
"If EXPR is CW<\\*(C`EXPR1 || EXPR2\\*(C'>, CW<\\*(C`EXPR1 // EXPR2\\*(C'>, " |
| 3255 |
"or CW<\\*(C`EXPR1 or EXPR2\\*(C'>, the test is applied I<recursively> to " |
| 3256 |
"EXPR1 only (which might itself be a higher-precedence AND operator, for " |
| 3257 |
"example, and thus subject to the previous rule), not to EXPR2. If EXPR1 is " |
| 3258 |
"to use smartmatching, then EXPR2 also does so, no matter what EXPR2 " |
| 3259 |
"contains. But if EXPR2 does not get to use smartmatching, then the second " |
| 3260 |
"argument will not be either. This is quite different from the " |
| 3261 |
"CW<\\*(C`&&\\*(C'> case just described, so be careful." |
| 3262 |
msgstr "" |
| 3263 |
|
| 3264 |
#. type: Plain text |
| 3265 |
#: debian-trixie debian-unstable |
| 3266 |
msgid "" |
| 3267 |
"These rules are complicated, but the goal is for them to do what you want " |
| 3268 |
"(even if you don't quite understand why they are doing it). For example:" |
| 3269 |
msgstr "" |
| 3270 |
|
| 3271 |
#. type: Plain text |
| 3272 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3273 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3274 |
#, no-wrap |
| 3275 |
msgid "\\& when (/^\\ed+$/ && $_ E<lt> 75) { ... }\n" |
| 3276 |
msgstr "\\& when (/^\\ed+$/ && $_ E<lt> 75) { ... }\n" |
| 3277 |
|
| 3278 |
#. type: Plain text |
| 3279 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3280 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3281 |
msgid "" |
| 3282 |
"will be treated as a boolean match because the rules say both a regex match " |
| 3283 |
"and an explicit test on CW<$_> will be treated as boolean." |
| 3284 |
msgstr "" |
| 3285 |
|
| 3286 |
#. type: Plain text |
| 3287 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3288 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3289 |
#, fuzzy |
| 3290 |
#| msgid "See Also" |
| 3291 |
msgid "Also:" |
| 3292 |
msgstr "ZOBACZ TAKŻE" |
| 3293 |
|
| 3294 |
#. type: Plain text |
| 3295 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3296 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3297 |
#, no-wrap |
| 3298 |
msgid "\\& when ([qw(foo bar)] && /baz/) { ... }\n" |
| 3299 |
msgstr "" |
| 3300 |
|
| 3301 |
#. type: Plain text |
| 3302 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3303 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3304 |
msgid "" |
| 3305 |
"will use smartmatching because only I<one> of the operands is a boolean: the " |
| 3306 |
"other uses smartmatching, and that wins." |
| 3307 |
msgstr "" |
| 3308 |
|
| 3309 |
#. type: Plain text |
| 3310 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3311 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3312 |
msgid "Further:" |
| 3313 |
msgstr "" |
| 3314 |
|
| 3315 |
#. type: Plain text |
| 3316 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3317 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3318 |
#, no-wrap |
| 3319 |
msgid "\\& when ([qw(foo bar)] || /^baz/) { ... }\n" |
| 3320 |
msgstr "" |
| 3321 |
|
| 3322 |
#. type: Plain text |
| 3323 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3324 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3325 |
msgid "will use smart matching (only the first operand is considered), whereas" |
| 3326 |
msgstr "" |
| 3327 |
|
| 3328 |
#. type: Plain text |
| 3329 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3330 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3331 |
#, no-wrap |
| 3332 |
msgid "\\& when (/^baz/ || [qw(foo bar)]) { ... }\n" |
| 3333 |
msgstr "" |
| 3334 |
|
| 3335 |
#. type: Plain text |
| 3336 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3337 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3338 |
msgid "" |
| 3339 |
"will test only the regex, which causes both operands to be treated as " |
| 3340 |
"boolean. Watch out for this one, then, because an arrayref is always a true " |
| 3341 |
"value, which makes it effectively redundant. Not a good idea." |
| 3342 |
msgstr "" |
| 3343 |
|
| 3344 |
#. type: Plain text |
| 3345 |
#: debian-trixie debian-unstable |
| 3346 |
msgid "" |
| 3347 |
"Tautologous boolean operators are still going to be optimized away. Don't " |
| 3348 |
"be tempted to write" |
| 3349 |
msgstr "" |
| 3350 |
|
| 3351 |
#. type: Plain text |
| 3352 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3353 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3354 |
#, no-wrap |
| 3355 |
msgid "\\& when (\"foo\" or \"bar\") { ... }\n" |
| 3356 |
msgstr "" |
| 3357 |
|
| 3358 |
#. type: Plain text |
| 3359 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3360 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3361 |
msgid "" |
| 3362 |
"This will optimize down to CW<\"foo\">, so CW<\"bar\"> will never be " |
| 3363 |
"considered (even though the rules say to use a smartmatch on CW<\"foo\">). " |
| 3364 |
"For an alternation like this, an array ref will work, because this will " |
| 3365 |
"instigate smartmatching:" |
| 3366 |
msgstr "" |
| 3367 |
|
| 3368 |
#. type: Plain text |
| 3369 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3370 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3371 |
#, no-wrap |
| 3372 |
msgid "\\& when ([qw(foo bar)] { ... }\n" |
| 3373 |
msgstr "" |
| 3374 |
|
| 3375 |
#. type: Plain text |
| 3376 |
#: debian-trixie debian-unstable |
| 3377 |
msgid "" |
| 3378 |
"This is somewhat equivalent to the C-style switch statement's fallthrough " |
| 3379 |
"functionality (not to be confused with I<Perl's> fallthrough functionality--" |
| 3380 |
"see below), wherein the same block is used for several " |
| 3381 |
"\\&CW<\\*(C`case\\*(C'> statements." |
| 3382 |
msgstr "" |
| 3383 |
|
| 3384 |
#. type: Plain text |
| 3385 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3386 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3387 |
msgid "" |
| 3388 |
"Another useful shortcut is that, if you use a literal array or hash as the " |
| 3389 |
"argument to CW<\\*(C`given\\*(C'>, it is turned into a reference. So " |
| 3390 |
"CW<given(@foo)> is the same as CW<given(\\e@foo)>, for example." |
| 3391 |
msgstr "" |
| 3392 |
|
| 3393 |
#. type: Plain text |
| 3394 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3395 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3396 |
msgid "" |
| 3397 |
"\\&CW<\\*(C`default\\*(C'> behaves exactly like CW<\\*(C`when(1 == " |
| 3398 |
"1)\\*(C'>, which is to say that it always matches." |
| 3399 |
msgstr "" |
| 3400 |
|
| 3401 |
#. type: Plain text |
| 3402 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3403 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3404 |
msgid "I<Breaking out>" |
| 3405 |
msgstr "" |
| 3406 |
|
| 3407 |
#. type: IX |
| 3408 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3409 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3410 |
#, no-wrap |
| 3411 |
msgid "Breaking out" |
| 3412 |
msgstr "" |
| 3413 |
|
| 3414 |
#. type: Plain text |
| 3415 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3416 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3417 |
msgid "" |
| 3418 |
"You can use the CW<\\*(C`break\\*(C'> keyword to break out of the enclosing " |
| 3419 |
"\\&CW<\\*(C`given\\*(C'> block. Every CW<\\*(C`when\\*(C'> block is " |
| 3420 |
"implicitly ended with a CW<\\*(C`break\\*(C'>." |
| 3421 |
msgstr "" |
| 3422 |
|
| 3423 |
#. type: Plain text |
| 3424 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3425 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3426 |
msgid "I<Fall-through>" |
| 3427 |
msgstr "" |
| 3428 |
|
| 3429 |
#. type: IX |
| 3430 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3431 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3432 |
#, no-wrap |
| 3433 |
msgid "Fall-through" |
| 3434 |
msgstr "" |
| 3435 |
|
| 3436 |
#. type: Plain text |
| 3437 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3438 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3439 |
msgid "" |
| 3440 |
"You can use the CW<\\*(C`continue\\*(C'> keyword to fall through from one " |
| 3441 |
"case to the next immediate CW<\\*(C`when\\*(C'> or CW<\\*(C`default\\*(C'>:" |
| 3442 |
msgstr "" |
| 3443 |
|
| 3444 |
#. type: Plain text |
| 3445 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3446 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3447 |
#, no-wrap |
| 3448 |
msgid "" |
| 3449 |
"\\& given($foo) {\n" |
| 3450 |
"\\& when (/x/) { say \\*(Aq$foo contains an x\\*(Aq; continue }\n" |
| 3451 |
"\\& when (/y/) { say \\*(Aq$foo contains a y\\*(Aq }\n" |
| 3452 |
"\\& default { say \\*(Aq$foo does not contain a y\\*(Aq }\n" |
| 3453 |
"\\& }\n" |
| 3454 |
msgstr "" |
| 3455 |
|
| 3456 |
#. type: Plain text |
| 3457 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3458 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3459 |
#, fuzzy |
| 3460 |
#| msgid "I<it_value>" |
| 3461 |
msgid "I<Return value>" |
| 3462 |
msgstr "I<it_value>" |
| 3463 |
|
| 3464 |
#. type: IX |
| 3465 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3466 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3467 |
#, no-wrap |
| 3468 |
msgid "Return value" |
| 3469 |
msgstr "" |
| 3470 |
|
| 3471 |
#. type: Plain text |
| 3472 |
#: debian-trixie debian-unstable |
| 3473 |
msgid "" |
| 3474 |
"When a CW<\\*(C`given\\*(C'> statement is also a valid expression (for " |
| 3475 |
"example, when it's the last statement of a block), it evaluates to:" |
| 3476 |
msgstr "" |
| 3477 |
|
| 3478 |
#. type: IP |
| 3479 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3480 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3481 |
#, no-wrap |
| 3482 |
msgid "\\(bu" |
| 3483 |
msgstr "\\(bu" |
| 3484 |
|
| 3485 |
#. type: Plain text |
| 3486 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3487 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3488 |
msgid "" |
| 3489 |
"An empty list as soon as an explicit CW<\\*(C`break\\*(C'> is encountered." |
| 3490 |
msgstr "" |
| 3491 |
|
| 3492 |
#. type: Plain text |
| 3493 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3494 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3495 |
msgid "" |
| 3496 |
"The value of the last evaluated expression of the successful " |
| 3497 |
"\\&CW<\\*(C`when\\*(C'>/CW<\\*(C`default\\*(C'> clause, if there happens to " |
| 3498 |
"be one." |
| 3499 |
msgstr "" |
| 3500 |
|
| 3501 |
#. type: Plain text |
| 3502 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3503 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3504 |
msgid "" |
| 3505 |
"The value of the last evaluated expression of the CW<\\*(C`given\\*(C'> " |
| 3506 |
"block if no condition is true." |
| 3507 |
msgstr "" |
| 3508 |
|
| 3509 |
#. type: Plain text |
| 3510 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3511 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3512 |
msgid "" |
| 3513 |
"In both last cases, the last expression is evaluated in the context that was " |
| 3514 |
"applied to the CW<\\*(C`given\\*(C'> block." |
| 3515 |
msgstr "" |
| 3516 |
|
| 3517 |
#. type: Plain text |
| 3518 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3519 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3520 |
msgid "" |
| 3521 |
"Note that, unlike CW<\\*(C`if\\*(C'> and CW<\\*(C`unless\\*(C'>, failed " |
| 3522 |
"CW<\\*(C`when\\*(C'> statements always evaluate to an empty list." |
| 3523 |
msgstr "" |
| 3524 |
|
| 3525 |
#. type: Plain text |
| 3526 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3527 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3528 |
#, no-wrap |
| 3529 |
msgid "" |
| 3530 |
"\\& my $price = do {\n" |
| 3531 |
"\\& given ($item) {\n" |
| 3532 |
"\\& when ([\"pear\", \"apple\"]) { 1 }\n" |
| 3533 |
"\\& break when \"vote\"; # My vote cannot be bought\n" |
| 3534 |
"\\& 1e10 when /Mona Lisa/;\n" |
| 3535 |
"\\& \"unknown\";\n" |
| 3536 |
"\\& }\n" |
| 3537 |
"\\& };\n" |
| 3538 |
msgstr "" |
| 3539 |
|
| 3540 |
#. type: Plain text |
| 3541 |
#: debian-trixie debian-unstable |
| 3542 |
msgid "" |
| 3543 |
"Currently, CW<\\*(C`given\\*(C'> blocks can't always be used as proper " |
| 3544 |
"expressions. This may be addressed in a future version of Perl." |
| 3545 |
msgstr "" |
| 3546 |
|
| 3547 |
#. type: Plain text |
| 3548 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3549 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3550 |
msgid "I<Switching in a loop>" |
| 3551 |
msgstr "" |
| 3552 |
|
| 3553 |
#. type: IX |
| 3554 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3555 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3556 |
#, no-wrap |
| 3557 |
msgid "Switching in a loop" |
| 3558 |
msgstr "" |
| 3559 |
|
| 3560 |
#. type: Plain text |
| 3561 |
#: debian-trixie debian-unstable |
| 3562 |
msgid "" |
| 3563 |
"Instead of using CW<given()>, you can use a CW<foreach()> loop. For " |
| 3564 |
"example, here's one way to count how many times a particular string occurs " |
| 3565 |
"in an array:" |
| 3566 |
msgstr "" |
| 3567 |
|
| 3568 |
#. type: Plain text |
| 3569 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3570 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3571 |
#, no-wrap |
| 3572 |
msgid "" |
| 3573 |
"\\& use v5.10.1;\n" |
| 3574 |
"\\& my $count = 0;\n" |
| 3575 |
"\\& for (@array) {\n" |
| 3576 |
"\\& when (\"foo\") { ++$count }\n" |
| 3577 |
"\\& }\n" |
| 3578 |
"\\& print \"\\e@array contains $count copies of \\*(Aqfoo\\*(Aq\\en\";\n" |
| 3579 |
msgstr "" |
| 3580 |
|
| 3581 |
#. type: Plain text |
| 3582 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3583 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3584 |
msgid "Or in a more recent version:" |
| 3585 |
msgstr "" |
| 3586 |
|
| 3587 |
#. type: Plain text |
| 3588 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3589 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3590 |
#, no-wrap |
| 3591 |
msgid "" |
| 3592 |
"\\& use v5.14;\n" |
| 3593 |
"\\& my $count = 0;\n" |
| 3594 |
"\\& for (@array) {\n" |
| 3595 |
"\\& ++$count when \"foo\";\n" |
| 3596 |
"\\& }\n" |
| 3597 |
"\\& print \"\\e@array contains $count copies of \\*(Aqfoo\\*(Aq\\en\";\n" |
| 3598 |
msgstr "" |
| 3599 |
|
| 3600 |
#. type: Plain text |
| 3601 |
#: debian-trixie debian-unstable |
| 3602 |
msgid "" |
| 3603 |
"At the end of all CW<\\*(C`when\\*(C'> blocks, there is an implicit " |
| 3604 |
"CW<\\*(C`next\\*(C'>. You can override that with an explicit " |
| 3605 |
"CW<\\*(C`last\\*(C'> if you're interested in only the first match alone." |
| 3606 |
msgstr "" |
| 3607 |
|
| 3608 |
#. type: Plain text |
| 3609 |
#: debian-trixie debian-unstable |
| 3610 |
msgid "" |
| 3611 |
"This doesn't work if you explicitly specify a loop variable, as in " |
| 3612 |
"CW<\\*(C`for $item (@array)\\*(C'>. You have to use the default variable " |
| 3613 |
"CW<$_>." |
| 3614 |
msgstr "" |
| 3615 |
|
| 3616 |
#. type: Plain text |
| 3617 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3618 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3619 |
msgid "I<Differences from Raku>" |
| 3620 |
msgstr "" |
| 3621 |
|
| 3622 |
#. type: IX |
| 3623 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3624 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3625 |
#, no-wrap |
| 3626 |
msgid "Differences from Raku" |
| 3627 |
msgstr "" |
| 3628 |
|
| 3629 |
#. type: Plain text |
| 3630 |
#: debian-trixie debian-unstable |
| 3631 |
msgid "" |
| 3632 |
"The Perl 5 smartmatch and CW<\\*(C`given\\*(C'>/CW<\\*(C`when\\*(C'> " |
| 3633 |
"constructs are not compatible with their Raku analogues. The most visible " |
| 3634 |
"difference and least important difference is that, in Perl 5, parentheses " |
| 3635 |
"are required around the argument to CW<given()> and CW<when()> (except when " |
| 3636 |
"this last one is used as a statement modifier). Parentheses in Raku are " |
| 3637 |
"always optional in a control construct such as CW<if()>, CW<while()>, or " |
| 3638 |
"CW<when()>; they can't be made optional in Perl 5 without a great deal of " |
| 3639 |
"potential confusion, because Perl 5 would parse the expression" |
| 3640 |
msgstr "" |
| 3641 |
|
| 3642 |
#. type: Plain text |
| 3643 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3644 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3645 |
#, no-wrap |
| 3646 |
msgid "" |
| 3647 |
"\\& given $foo {\n" |
| 3648 |
"\\& ...\n" |
| 3649 |
"\\& }\n" |
| 3650 |
msgstr "" |
| 3651 |
"\\& given $foo {\n" |
| 3652 |
"\\& ...\n" |
| 3653 |
"\\& }\n" |
| 3654 |
|
| 3655 |
#. type: Plain text |
| 3656 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3657 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3658 |
msgid "" |
| 3659 |
"as though the argument to CW<\\*(C`given\\*(C'> were an element of the hash " |
| 3660 |
"\\&CW<%foo>, interpreting the braces as hash-element syntax." |
| 3661 |
msgstr "" |
| 3662 |
|
| 3663 |
#. type: Plain text |
| 3664 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3665 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3666 |
msgid "" |
| 3667 |
"However, there are many, many other differences. For example, this works in " |
| 3668 |
"Perl 5:" |
| 3669 |
msgstr "" |
| 3670 |
|
| 3671 |
#. type: Plain text |
| 3672 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3673 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3674 |
#, no-wrap |
| 3675 |
msgid "" |
| 3676 |
"\\& use v5.12;\n" |
| 3677 |
"\\& my @primary = (\"red\", \"blue\", \"green\");\n" |
| 3678 |
"\\&\n" |
| 3679 |
"\\& if (@primary ~~ \"red\") {\n" |
| 3680 |
"\\& say \"primary smartmatches red\";\n" |
| 3681 |
"\\& }\n" |
| 3682 |
"\\&\n" |
| 3683 |
"\\& if (\"red\" ~~ @primary) {\n" |
| 3684 |
"\\& say \"red smartmatches primary\";\n" |
| 3685 |
"\\& }\n" |
| 3686 |
"\\&\n" |
| 3687 |
"\\& say \"that\\*(Aqs all, folks!\";\n" |
| 3688 |
msgstr "" |
| 3689 |
|
| 3690 |
#. type: Plain text |
| 3691 |
#: debian-trixie debian-unstable |
| 3692 |
msgid "" |
| 3693 |
"But it doesn't work at all in Raku. Instead, you should use the " |
| 3694 |
"(parallelizable) CW<\\*(C`any\\*(C'> operator:" |
| 3695 |
msgstr "" |
| 3696 |
|
| 3697 |
#. type: Plain text |
| 3698 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3699 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3700 |
#, no-wrap |
| 3701 |
msgid "" |
| 3702 |
"\\& if any(@primary) eq \"red\" {\n" |
| 3703 |
"\\& say \"primary smartmatches red\";\n" |
| 3704 |
"\\& }\n" |
| 3705 |
"\\&\n" |
| 3706 |
"\\& if \"red\" eq any(@primary) {\n" |
| 3707 |
"\\& say \"red smartmatches primary\";\n" |
| 3708 |
"\\& }\n" |
| 3709 |
msgstr "" |
| 3710 |
|
| 3711 |
#. type: Plain text |
| 3712 |
#: debian-trixie debian-unstable |
| 3713 |
msgid "" |
| 3714 |
"The table of smartmatches in \"Smartmatch Operator\" in perlop is not " |
| 3715 |
"identical to that proposed by the Raku specification, mainly due to " |
| 3716 |
"differences between Raku's and Perl 5's data models, but also because the " |
| 3717 |
"Raku spec has changed since Perl 5 rushed into early adoption." |
| 3718 |
msgstr "" |
| 3719 |
|
| 3720 |
#. type: Plain text |
| 3721 |
#: debian-trixie debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 3722 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3723 |
msgid "" |
| 3724 |
"In Raku, CW<when()> will always do an implicit smartmatch with its argument, " |
| 3725 |
"while in Perl 5 it is convenient (albeit potentially confusing) to suppress " |
| 3726 |
"this implicit smartmatch in various rather loosely-defined situations, as " |
| 3727 |
"roughly outlined above. (The difference is largely because Perl 5 does not " |
| 3728 |
"have, even internally, a boolean type.)" |
| 3729 |
msgstr "" |
| 3730 |
|
| 3731 |
#. type: TH |
| 3732 |
#: debian-unstable |
| 3733 |
#, no-wrap |
| 3734 |
msgid "2025-11-16" |
| 3735 |
msgstr "16 listopada 2025 r." |
| 3736 |
|
| 3737 |
#. type: TH |
| 3738 |
#: fedora-44 opensuse-leap-16-1 opensuse-tumbleweed |
| 3739 |
#, no-wrap |
| 3740 |
msgid "2026-03-09" |
| 3741 |
msgstr "9 marca 2026 r." |
| 3742 |
|
| 3743 |
#. type: TH |
| 3744 |
#: fedora-44 opensuse-leap-16-1 opensuse-tumbleweed |
| 3745 |
#, no-wrap |
| 3746 |
msgid "perl v5.42.1" |
| 3747 |
msgstr "perl v5.42.1" |
| 3748 |
|
| 3749 |
#. type: Plain text |
| 3750 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 3751 |
#: opensuse-tumbleweed |
| 3752 |
msgid "" |
| 3753 |
"Many of Perl\\*(Aqs syntactic elements are B<optional>. Rather than " |
| 3754 |
"requiring you to put parentheses around every function call and declare " |
| 3755 |
"every variable, you can often leave such explicit elements off and Perl will " |
| 3756 |
"figure out what you meant. This is known as B<Do What I Mean>, abbreviated " |
| 3757 |
"B<DWIM>. It allows programmers to be B<lazy> and to code in a style with " |
| 3758 |
"which they are comfortable." |
| 3759 |
msgstr "" |
| 3760 |
|
| 3761 |
#. type: Plain text |
| 3762 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 3763 |
#: opensuse-tumbleweed |
| 3764 |
msgid "" |
| 3765 |
"The only things you need to declare in Perl are report formats and " |
| 3766 |
"subroutines (and sometimes not even subroutines). A scalar variable holds " |
| 3767 |
"the undefined value (CW<\\*(C`undef\\*(C'>) until it has been assigned a " |
| 3768 |
"defined value, which is anything other than CW<\\*(C`undef\\*(C'>. When " |
| 3769 |
"used as a number, \\&CW<\\*(C`undef\\*(C'> is treated as CW<0>; when used as " |
| 3770 |
"a string, it is treated as the empty string, CW<\"\">; and when used as a " |
| 3771 |
"reference that isn\\*(Aqt being assigned to, it is treated as an error. If " |
| 3772 |
"you enable warnings, you\\*(Aqll be notified of an uninitialized value " |
| 3773 |
"whenever you treat \\&CW<\\*(C`undef\\*(C'> as a string or a number. Well, " |
| 3774 |
"usually. Boolean contexts, such as:" |
| 3775 |
msgstr "" |
| 3776 |
|
| 3777 |
#. type: Plain text |
| 3778 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 3779 |
#: opensuse-tumbleweed |
| 3780 |
#, fuzzy |
| 3781 |
#| msgid "" |
| 3782 |
#| "The declaration can be inserted anywhere a statement can be inserted, but " |
| 3783 |
#| "it has no effect on the execution of the underlying sequence of " |
| 3784 |
#| "statements\\*(--declarations only have meaning during compilation. " |
| 3785 |
#| "Typically all declarations are inserted at the beginning or end of a " |
| 3786 |
#| "script. However, if you use lexically scoped private variables created by " |
| 3787 |
#| "I<my()>, you will need to make sure that your form or procedure " |
| 3788 |
#| "definition using the declarations is within the same scope." |
| 3789 |
msgid "" |
| 3790 |
"A declaration can be put anywhere a statement can, but has no effect on the " |
| 3791 |
"execution of the primary sequence of statements: declarations all take " |
| 3792 |
"effect at compile time. All declarations are typically put at the beginning " |
| 3793 |
"or the end of the script. However, if you\\*(Aqre using lexically-scoped " |
| 3794 |
"private variables created with CW<my()>, \\&CW<state()>, or CW<our()>, " |
| 3795 |
"you\\*(Aqll have to make sure your format or subroutine definition is within " |
| 3796 |
"the same block scope as the B<my()> if you expect to be able to access those " |
| 3797 |
"private variables." |
| 3798 |
msgstr "" |
| 3799 |
"Deklaracja może być wstawiona gdziekolwiek, gdzie można wstawić instrukcję, " |
| 3800 |
"lecz nie ma wpływu na wykonywanie podstawowej sekwencji instrukcji\\*(--" |
| 3801 |
"deklaracje mają znaczenie tylko podczas kompilacji. Zazwyczaj wszystkie " |
| 3802 |
"deklaracje wstawiane są na początku lub na końcu skryptu. Jeśli jednak " |
| 3803 |
"używasz zmiennych prywatnych zawężonych leksykalnie, utworzonych przez " |
| 3804 |
"I<my()>, będziesz musiał się upewnić, czy twoja definicja formatki lub " |
| 3805 |
"procedury, używającej tych deklaracji leży wewnątrz tego samego zakresu." |
| 3806 |
|
| 3807 |
#. type: Plain text |
| 3808 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 3809 |
#: opensuse-tumbleweed |
| 3810 |
msgid "" |
| 3811 |
"That now parses as you\\*(Aqd expect, but you still ought to get in the " |
| 3812 |
"habit of using parentheses in that situation. For more on prototypes, see " |
| 3813 |
"perlsub." |
| 3814 |
msgstr "" |
| 3815 |
|
| 3816 |
#. type: Plain text |
| 3817 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 3818 |
#: opensuse-tumbleweed |
| 3819 |
#, fuzzy |
| 3820 |
#| msgid "" |
| 3821 |
#| "The only kind of simple statement is an expression, evaluated for its " |
| 3822 |
#| "side effects. Each simple statement must end with a semicolon, unless it " |
| 3823 |
#| "is the last statement of a block, in which case the semicolon is not " |
| 3824 |
#| "required. (However, it is still recommended if the block spans more than " |
| 3825 |
#| "one line, since you may add more lines.) Note that there are operators " |
| 3826 |
#| "such as CW<eval {}> and CW<do {}> that look like compound statements, but " |
| 3827 |
#| "are not, and require an explicit termination if used as the last element " |
| 3828 |
#| "of a statement." |
| 3829 |
msgid "" |
| 3830 |
"The only kind of simple statement is an expression evaluated for its side-" |
| 3831 |
"effects. Every simple statement must be terminated with a semicolon, unless " |
| 3832 |
"it is the final statement in a block, in which case the semicolon is " |
| 3833 |
"optional. But put the semicolon in anyway if the block takes up more than " |
| 3834 |
"one line, because you may eventually add another line. Note that there are " |
| 3835 |
"operators like CW<\\*(C`eval {}\\*(C'>, CW<\\*(C`sub {}\\*(C'>, and " |
| 3836 |
"\\&CW<\\*(C`do {}\\*(C'> that I<look> like compound statements, but " |
| 3837 |
"aren\\*(Aqt--they\\*(Aqre just TERMs in an expression--and thus need an " |
| 3838 |
"explicit termination when used as the last item in a statement." |
| 3839 |
msgstr "" |
| 3840 |
"Jedynym rodzajem instrukcji prostej jest wyrażenie, analizowane dla swoich " |
| 3841 |
"efektów ubocznych. Każda instrukcja prosta musi się kończyć średnikiem, " |
| 3842 |
"chyba że jest ostatnią instrukcją bloku, wtedy średnik nie jest " |
| 3843 |
"obowiązujący. (Jednak wciąż jest zalecany jeśli blok zajmuje więcej niż " |
| 3844 |
"jedną linię, gdyż możliwe że dodasz jeszcze kolejne linie.) Zauważ, że " |
| 3845 |
"istnieją operatory takie, jak CW<eval {}> i CW<do {}>, które wyglądają jak " |
| 3846 |
"instrukcje złożone, lecz nimi nie są i wymagają jawnego zakończenia jeśli są " |
| 3847 |
"użyte jako ostatni element instrukcji." |
| 3848 |
|
| 3849 |
#. type: Plain text |
| 3850 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 3851 |
#: opensuse-tumbleweed |
| 3852 |
#, fuzzy |
| 3853 |
#| msgid "" |
| 3854 |
#| "See the description of CW<do> in the B<perlfunc>(1) manual. Also note " |
| 3855 |
#| "that the loop control statements I<\\s-1NOT\\s0> described below will " |
| 3856 |
#| "work in this construct, since the modifiers don't take loop labels. " |
| 3857 |
#| "Sorry. You can always put another block inside (for CW<next>) or put your " |
| 3858 |
#| "statement inside a block (for CW<last>) to do something like that. In the " |
| 3859 |
#| "case of CW<next>, just double the parentheses:" |
| 3860 |
msgid "" |
| 3861 |
"See \"do\" in perlfunc. Note also that the loop control statements " |
| 3862 |
"described later will I<NOT> work in this construct, because modifiers " |
| 3863 |
"don\\*(Aqt take loop labels. Sorry. You can always put another block " |
| 3864 |
"inside of it (for CW<\\*(C`next\\*(C'>/CW<\\*(C`redo\\*(C'>) or around it " |
| 3865 |
"(for CW<\\*(C`last\\*(C'>) to do that sort of thing." |
| 3866 |
msgstr "" |
| 3867 |
"Zobacz opis CW<do> w podręczniku B<perlfunc>(1). Zauważ też, że opisane " |
| 3868 |
"poniżej instrukcje kontroli pętli I<\\s-1NIE\\s0> będą działały w tej " |
| 3869 |
"konstrukcji, gdyż modyfikatory nie pobierają etykiet pętli. Przykro mi. " |
| 3870 |
"Możesz zawsze umieścić wewnątrz inny blok (dla CW<next>) lub też umieścić " |
| 3871 |
"swoją instrukcję wewnątrz bloku (dla CW<last>), aby zrobić coś takiego. W " |
| 3872 |
"przypadku CW<next> po prostu podwój nawiasy:" |
| 3873 |
|
| 3874 |
#. type: Plain text |
| 3875 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 3876 |
#: opensuse-tumbleweed |
| 3877 |
msgid "" |
| 3878 |
"\\&B<NOTE:> The behaviour of a CW<\\*(C`my\\*(C'>, CW<\\*(C`state\\*(C'>, or " |
| 3879 |
"\\&CW<\\*(C`our\\*(C'> modified with a statement modifier conditional or " |
| 3880 |
"loop construct (for example, CW<\\*(C`my $x if ...\\*(C'>) is " |
| 3881 |
"\\&B<undefined>. The value of the CW<\\*(C`my\\*(C'> variable may be " |
| 3882 |
"CW<\\*(C`undef\\*(C'>, any previously assigned value, or possibly anything " |
| 3883 |
"else. Don\\*(Aqt rely on it. Future versions of perl might do something " |
| 3884 |
"different from the version of perl you try it out on. Here be dragons." |
| 3885 |
msgstr "" |
| 3886 |
|
| 3887 |
#. type: Plain text |
| 3888 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 3889 |
#: opensuse-tumbleweed |
| 3890 |
msgid "" |
| 3891 |
"Under the current implementation, the CW<\\*(C`foreach\\*(C'> loop can be " |
| 3892 |
"anywhere within the CW<\\*(C`when\\*(C'> modifier\\*(Aqs dynamic scope, but " |
| 3893 |
"must be within the CW<\\*(C`given\\*(C'> block\\*(Aqs lexical scope. This " |
| 3894 |
"restriction may be relaxed in a future release. See \"Switch Statements\" " |
| 3895 |
"below." |
| 3896 |
msgstr "" |
| 3897 |
|
| 3898 |
#. type: Plain text |
| 3899 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 3900 |
#: opensuse-tumbleweed |
| 3901 |
msgid "" |
| 3902 |
"The CW<\\*(C`if\\*(C'> statement is straightforward. Because BLOCKs are " |
| 3903 |
"always bounded by curly brackets, there is never any ambiguity about which " |
| 3904 |
"\\&CW<\\*(C`if\\*(C'> an CW<\\*(C`else\\*(C'> goes with. If you use " |
| 3905 |
"CW<\\*(C`unless\\*(C'> in place of CW<\\*(C`if\\*(C'>, the sense of the test " |
| 3906 |
"is reversed. Like CW<\\*(C`if\\*(C'>, CW<\\*(C`unless\\*(C'> can be " |
| 3907 |
"followed by CW<\\*(C`else\\*(C'>. CW<\\*(C`unless\\*(C'> can even be " |
| 3908 |
"followed by one or more CW<\\*(C`elsif\\*(C'> statements, though you may " |
| 3909 |
"want to think twice before using that particular language construct, as " |
| 3910 |
"everyone reading your code will have to think at least twice before they can " |
| 3911 |
"understand what\\*(Aqs going on." |
| 3912 |
msgstr "" |
| 3913 |
|
| 3914 |
#. type: Plain text |
| 3915 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 3916 |
#: opensuse-tumbleweed |
| 3917 |
#, fuzzy |
| 3918 |
#| msgid "" |
| 3919 |
#| "The CW<while> statement executes its block as long as expression is true " |
| 3920 |
#| "(its value is not the empty string, 0, or \\*(L\"0\"). \\s-1LABEL\\s0 is " |
| 3921 |
#| "optional, and if present, consists of an identifier followed by a colon. " |
| 3922 |
#| "\\s-1LABEL\\s0 identifies the loop for loop control statements, which are " |
| 3923 |
#| "CW<next>, CW<last>, and CW<redo>. If \\s-1LABEL\\s0 is omitted, the loop " |
| 3924 |
#| "control statements refer to the innermost enclosing loop. This may " |
| 3925 |
#| "require dynamically looking back through the call stack at run time to " |
| 3926 |
#| "find the appropriate \\s-1LABEL\\s0. Such desperate behavior usually " |
| 3927 |
#| "produces warnings when the B<-w> flag is on." |
| 3928 |
msgid "" |
| 3929 |
"The CW<\\*(C`while\\*(C'> statement executes the block as long as the " |
| 3930 |
"expression is true. The CW<\\*(C`until\\*(C'> statement executes the block " |
| 3931 |
"as long as the expression is false. The LABEL is optional, and if present, " |
| 3932 |
"consists of an identifier followed by a colon. The LABEL identifies the " |
| 3933 |
"loop for the loop control statements CW<\\*(C`next\\*(C'>, " |
| 3934 |
"CW<\\*(C`last\\*(C'>, and CW<\\*(C`redo\\*(C'>. If the LABEL is omitted, " |
| 3935 |
"the loop control statement refers to the innermost enclosing loop. This may " |
| 3936 |
"include dynamically searching through your call-stack at run time to find " |
| 3937 |
"the LABEL. Such desperate behavior triggers a warning if you use the " |
| 3938 |
"CW<\\*(C`use warnings\\*(C'> pragma or the B<-w> flag. If more than one " |
| 3939 |
"label with the same name occurs, any reference to that name refers to the " |
| 3940 |
"one labelling the innermost enclosing loop." |
| 3941 |
msgstr "" |
| 3942 |
"Instrukcja CW<while> wykonuje swój blok tak długo, jak wyrażenie jest " |
| 3943 |
"prawdziwe (jego wartością nie jest łańcuch pusty, 0 czy \\*(L\"0\"). " |
| 3944 |
"\\s-1ETYKIETA\\s0 jest opcjonalna, a jeśli jest obecna, składa się z " |
| 3945 |
"identyfikatora, za którym następuje dwukropek. \\s-1ETYKIETA\\s0 " |
| 3946 |
"identyfikuje pętlę dla instrukcji kontroli pętli, czyli CW<next>, CW<last> i " |
| 3947 |
"CW<redo>. Jeśli pominięto \\s-1ETYKIETĘ\\s0, instrukcje kontroli pętli " |
| 3948 |
"odnoszą się do najbardziej wewnętrznej otaczającej pętli. Może to wymagać " |
| 3949 |
"dynamicznego przeglądania wstecz stosu wywołań w czasie wykonania, aby " |
| 3950 |
"znaleźć odpowiednią \\s-1ETYKIETĘ\\s0. Takie desperackie zachowania dają " |
| 3951 |
"zwykle ostrzeżenia przy włączonej fladze B<-w>." |
| 3952 |
|
| 3953 |
#. type: Plain text |
| 3954 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 3955 |
#: opensuse-tumbleweed |
| 3956 |
msgid "" |
| 3957 |
"If the condition expression of a CW<\\*(C`while\\*(C'> statement is based on " |
| 3958 |
"any of a group of iterative expression types then it gets some magic " |
| 3959 |
"treatment. The affected iterative expression types are " |
| 3960 |
"CW<\\*(C`readline\\*(C'>, the CW<\\*(C`E<lt>FILEHANDLEE<gt>\\*(C'> input " |
| 3961 |
"operator, CW<\\*(C`readdir\\*(C'>, CW<\\*(C`glob\\*(C'>, the " |
| 3962 |
"CW<\\*(C`E<lt>PATTERNE<gt>\\*(C'> globbing operator, and " |
| 3963 |
"CW<\\*(C`each\\*(C'>. If the condition expression is one of these " |
| 3964 |
"expression types, then the value yielded by the iterative operator will be " |
| 3965 |
"implicitly assigned to CW<$_>. If the condition expression is one of these " |
| 3966 |
"expression types or an explicit assignment of one of them to a scalar, then " |
| 3967 |
"the condition actually tests for definedness of the expression\\*(Aqs value, " |
| 3968 |
"not for its regular truth value." |
| 3969 |
msgstr "" |
| 3970 |
|
| 3971 |
#. type: Plain text |
| 3972 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 3973 |
#: opensuse-tumbleweed |
| 3974 |
msgid "" |
| 3975 |
"Extension modules can also hook into the Perl parser to define new kinds of " |
| 3976 |
"compound statements. These are introduced by a keyword which the extension " |
| 3977 |
"recognizes, and the syntax following the keyword is defined entirely by the " |
| 3978 |
"extension. If you are an implementor, see \"PL_keyword_plugin\" in perlapi " |
| 3979 |
"for the mechanism. If you are using such a module, see the module\\*(Aqs " |
| 3980 |
"documentation for details of the syntax that it defines." |
| 3981 |
msgstr "" |
| 3982 |
|
| 3983 |
#. type: Plain text |
| 3984 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 3985 |
#: opensuse-tumbleweed |
| 3986 |
#, fuzzy |
| 3987 |
#| msgid "" |
| 3988 |
#| "Loop control statements don't work with CW<if> or CW<unless>, since they " |
| 3989 |
#| "aren't loops. You can double the parentheses to make them loops, though." |
| 3990 |
msgid "" |
| 3991 |
"Loop control statements don\\*(Aqt work in an CW<\\*(C`if\\*(C'> or " |
| 3992 |
"CW<\\*(C`unless\\*(C'>, since they aren\\*(Aqt loops. You can double the " |
| 3993 |
"braces to make them such, though." |
| 3994 |
msgstr "" |
| 3995 |
"Instrukcje sterujące pętli nie współpracują z CW<if> ani CW<unless>, gdyż " |
| 3996 |
"nie są one pętlami. Możesz jednak podwoić nawiasy by je nimi uczynić." |
| 3997 |
|
| 3998 |
#. type: Plain text |
| 3999 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4000 |
#: opensuse-tumbleweed |
| 4001 |
#, fuzzy |
| 4002 |
#| msgid "" |
| 4003 |
#| "Perl's C-style CW<for> loop works exactly like its corresponding while " |
| 4004 |
#| "loop, which means that:" |
| 4005 |
msgid "" |
| 4006 |
"Perl\\*(Aqs C-style CW<\\*(C`for\\*(C'> loop works like the corresponding " |
| 4007 |
"CW<\\*(C`while\\*(C'> loop; that means that this:" |
| 4008 |
msgstr "" |
| 4009 |
"Perlowa pętla CW<for> w stylu C, działa dokładnie jak odpowiadająca jej " |
| 4010 |
"pętla while, co znaczy, że to:" |
| 4011 |
|
| 4012 |
#. type: Plain text |
| 4013 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4014 |
#: opensuse-tumbleweed |
| 4015 |
#, fuzzy |
| 4016 |
#| msgid "" |
| 4017 |
#| "Besides simply looping through array indices, CW<for> has many other " |
| 4018 |
#| "uses. Here is an example that avoids the problem encountered when " |
| 4019 |
#| "explicitly testing for EOF on an interactive file descriptor, which " |
| 4020 |
#| "causes the program to appear to hang." |
| 4021 |
msgid "" |
| 4022 |
"Besides the normal array index looping, CW<\\*(C`for\\*(C'> can lend itself " |
| 4023 |
"to many other interesting applications. Here\\*(Aqs one that avoids the " |
| 4024 |
"problem you get into if you explicitly test for end-of-file on an " |
| 4025 |
"interactive file descriptor causing your program to appear to hang." |
| 4026 |
msgstr "" |
| 4027 |
"Poza zwykłymi pętlami po indeksach tablic, CW<for> daje wiele innych " |
| 4028 |
"zastosowań. Oto przykład, zapobiegający problemowi, który napotyka się " |
| 4029 |
"testując jawnie EOF na interaktywnym deskryptorze pliku, co powoduje, że " |
| 4030 |
"program wygląda jakby się zawiesił." |
| 4031 |
|
| 4032 |
#. type: Plain text |
| 4033 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4034 |
#: opensuse-tumbleweed |
| 4035 |
#, fuzzy |
| 4036 |
#| msgid "" |
| 4037 |
#| "The CW<foreach> loop iterates through a normal list value and assigns the " |
| 4038 |
#| "variable \\s-1VAR\\s0 the value of each successive element of the list. " |
| 4039 |
#| "If the variable is preceded by the keyword CW<my>, then it is lexically " |
| 4040 |
#| "scoped and visible only within the loop. Otherwise, the variable is " |
| 4041 |
#| "implicitly local to the loop and, upon exiting it, regains its original " |
| 4042 |
#| "value. If the variable was previously declared by CW<my>, then the loop " |
| 4043 |
#| "uses that variable instead of the global variable, but it is still local " |
| 4044 |
#| "to the loop. (Note that lexically scoped variables can cause problems if " |
| 4045 |
#| "you have procedures or format declarations referencing them within the " |
| 4046 |
#| "loop.)" |
| 4047 |
msgid "" |
| 4048 |
"The CW<\\*(C`foreach\\*(C'> loop iterates over a normal list value and sets " |
| 4049 |
"the scalar variable VAR to be each element of the list in turn. If the " |
| 4050 |
"variable is preceded with the keyword CW<\\*(C`my\\*(C'>, then it is " |
| 4051 |
"lexically scoped, and is therefore visible only within the loop. Otherwise, " |
| 4052 |
"the variable is implicitly local to the loop and regains its former value " |
| 4053 |
"upon exiting the loop. If the variable was previously declared with " |
| 4054 |
"CW<\\*(C`my\\*(C'>, it uses that variable instead of the global one, but " |
| 4055 |
"it\\*(Aqs still localized to the loop. This implicit localization occurs " |
| 4056 |
"I<only> for non C-style loops." |
| 4057 |
msgstr "" |
| 4058 |
"Pętla CW<foreach> iteruje poprzez normalną wartość listową i przypisuje " |
| 4059 |
"zmiennej \\s-1VAR\\s0 wartość każdego kolejnego elementu listy. Jeśli " |
| 4060 |
"zmienna jest poprzedzona słowem kluczowym CW<my>, to jest ona leksykalnie " |
| 4061 |
"zawężona i widzialna tylko wewnątrz pętli. W przeciwnym wypadku, zmienna " |
| 4062 |
"jest niejawnie lokalna w pętli i, po wyjściu z niej, odzyskuje pierwotną " |
| 4063 |
"wartość. Jeśli zmienna była poprzednio zadeklarowana przez CW<my>, to pętla " |
| 4064 |
"używa tej zmiennej, zamiast zmiennej globalnej, lecz wciąż jest ona lokalna " |
| 4065 |
"w obrębie pętli. (Zauważ, że zmienne o zasięgu leksykalnym mogą być " |
| 4066 |
"przyczyną kłopotów, jeśli wewnątrz pętli masz odwołujące się do nich " |
| 4067 |
"procedury lub deklaracje formatów.)" |
| 4068 |
|
| 4069 |
#. type: Plain text |
| 4070 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4071 |
#: opensuse-tumbleweed |
| 4072 |
msgid "" |
| 4073 |
"If any element of LIST is an lvalue, you can modify it by modifying VAR " |
| 4074 |
"inside the loop. Conversely, if any element of LIST is NOT an lvalue, any " |
| 4075 |
"attempt to modify that element will fail. In other words, the " |
| 4076 |
"CW<\\*(C`foreach\\*(C'> loop index variable is an implicit alias for each " |
| 4077 |
"item in the list that you\\*(Aqre looping over." |
| 4078 |
msgstr "" |
| 4079 |
|
| 4080 |
#. type: Plain text |
| 4081 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4082 |
#: opensuse-tumbleweed |
| 4083 |
#, fuzzy |
| 4084 |
#| msgid "" |
| 4085 |
#| "If any part of \\s-1LIST\\s0 is an array, CW<foreach> will get very " |
| 4086 |
#| "messed up if you add or remove elements inside the loop, for example with " |
| 4087 |
#| "CW<splice>. So don't do that." |
| 4088 |
msgid "" |
| 4089 |
"If any part of LIST is an array, CW<\\*(C`foreach\\*(C'> will get very " |
| 4090 |
"confused if you add or remove elements within the loop body, for example " |
| 4091 |
"with \\&CW<\\*(C`splice\\*(C'>. So don\\*(Aqt do that." |
| 4092 |
msgstr "" |
| 4093 |
"Jeśli dowolna część \\s-1LISTY\\s0 jest tablicą, to CW<foreach> bardzo się " |
| 4094 |
"zmiesza, jeśli wewnątrz pętli dodasz lub usuniesz elementy, na przykład przy " |
| 4095 |
"pomocy CW<splice>. Nie rób więc tego." |
| 4096 |
|
| 4097 |
#. type: Plain text |
| 4098 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4099 |
#: opensuse-tumbleweed |
| 4100 |
#, fuzzy |
| 4101 |
#| msgid "" |
| 4102 |
#| "CW<foreach> probably won't do what you want if \\s-1VAR\\s0 is a special " |
| 4103 |
#| "variable. Don't do that either." |
| 4104 |
msgid "" |
| 4105 |
"\\&CW<\\*(C`foreach\\*(C'> probably won\\*(Aqt do what you expect if VAR is " |
| 4106 |
"a tied or other special variable. Don\\*(Aqt do that either." |
| 4107 |
msgstr "" |
| 4108 |
"CW<foreach> prawdopodobnie nie zrobi tego, czego oczekujesz, jeśli " |
| 4109 |
"\\s-1VAR\\s0 jest zmienną specjalną. Tego też nie rób." |
| 4110 |
|
| 4111 |
#. type: Plain text |
| 4112 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4113 |
#: opensuse-tumbleweed |
| 4114 |
msgid "" |
| 4115 |
"As of Perl 5.22, there is an experimental variant of this loop that accepts " |
| 4116 |
"a variable preceded by a backslash for VAR, in which case the items in the " |
| 4117 |
"LIST must be references. The backslashed variable will become an alias to " |
| 4118 |
"each referenced item in the LIST, which must be of the correct type. The " |
| 4119 |
"variable needn\\*(Aqt be a scalar in this case, and the backslash may be " |
| 4120 |
"followed by CW<\\*(C`my\\*(C'>. To use this form, you must enable the " |
| 4121 |
"CW<\\*(C`refaliasing\\*(C'> feature via CW<\\*(C`use feature\\*(C'>. (See " |
| 4122 |
"feature. See also \"Assigning to References\" in perlref.)" |
| 4123 |
msgstr "" |
| 4124 |
|
| 4125 |
#. type: Plain text |
| 4126 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4127 |
#: opensuse-tumbleweed |
| 4128 |
msgid "" |
| 4129 |
"As of Perl 5.36, you can iterate over multiple values at a time. You can " |
| 4130 |
"only iterate with lexical scalars as the iterator variables - unlike list " |
| 4131 |
"assignment, it\\*(Aqs not possible to use CW<\\*(C`undef\\*(C'> to signify a " |
| 4132 |
"value that isn\\*(Aqt wanted. This is a limitation of the current " |
| 4133 |
"implementation, and might be changed in the future." |
| 4134 |
msgstr "" |
| 4135 |
|
| 4136 |
#. type: Plain text |
| 4137 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4138 |
#: opensuse-tumbleweed |
| 4139 |
msgid "" |
| 4140 |
"If the size of the LIST is not an exact multiple of the number of iterator " |
| 4141 |
"variables, then on the last iteration the \"excess\" iterator variables are " |
| 4142 |
"aliases to CW<\\*(C`undef\\*(C'>, as if the LIST had CW<\\*(C`, undef\\*(C'> " |
| 4143 |
"appended as many times as needed for its length to become an exact " |
| 4144 |
"multiple. This happens whether LIST is a literal LIST or an array - i.e. " |
| 4145 |
"arrays are not extended if their size is not a multiple of the iteration " |
| 4146 |
"size, consistent with iterating an array one-at-a-time. As these padding " |
| 4147 |
"elements are not lvalues, attempting to modify them will fail, consistent " |
| 4148 |
"with the behaviour when iterating a list with literal " |
| 4149 |
"CW<\\*(C`undef\\*(C'>s. If this is not the behaviour you desire, then " |
| 4150 |
"before the loop starts either explicitly extend your array to be an exact " |
| 4151 |
"multiple, or explicitly throw an exception." |
| 4152 |
msgstr "" |
| 4153 |
|
| 4154 |
#. type: Plain text |
| 4155 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4156 |
#: opensuse-tumbleweed |
| 4157 |
#, fuzzy |
| 4158 |
#| msgid "" |
| 4159 |
#| "Here's how a C programmer might code up a particular algorithm in Perl:" |
| 4160 |
msgid "" |
| 4161 |
"Here\\*(Aqs how a C programmer might code up a particular algorithm in Perl:" |
| 4162 |
msgstr "Oto, jak programista C mógłby zakodować szczególny algorytm w perlu:" |
| 4163 |
|
| 4164 |
#. type: Plain text |
| 4165 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4166 |
#: opensuse-tumbleweed |
| 4167 |
msgid "" |
| 4168 |
"Whereas here\\*(Aqs how a Perl programmer more comfortable with the idiom " |
| 4169 |
"might do it:" |
| 4170 |
msgstr "" |
| 4171 |
|
| 4172 |
#. type: Plain text |
| 4173 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4174 |
#: opensuse-tumbleweed |
| 4175 |
#, fuzzy |
| 4176 |
#| msgid "" |
| 4177 |
#| "See how simple that is? Cleaner, safer, and faster. It's cleaner because " |
| 4178 |
#| "there's less clutter. It's safer because if code is added between the " |
| 4179 |
#| "inner and outer loops later, it won't be executed by accident. CW<next> " |
| 4180 |
#| "explicitly iterates another loop instead of breaking out of the inner " |
| 4181 |
#| "one. It's faster because Perl executes CW<foreach> statements faster than " |
| 4182 |
#| "the CW<for> equivalent." |
| 4183 |
msgid "" |
| 4184 |
"See how much easier this is? It\\*(Aqs cleaner, safer, and faster. " |
| 4185 |
"It\\*(Aqs cleaner because it\\*(Aqs less noisy. It\\*(Aqs safer because if " |
| 4186 |
"code gets added between the inner and outer loops later on, the new code " |
| 4187 |
"won\\*(Aqt be accidentally executed. The CW<\\*(C`next\\*(C'> explicitly " |
| 4188 |
"iterates the other loop rather than merely terminating the inner one. And " |
| 4189 |
"it\\*(Aqs faster because Perl executes a CW<\\*(C`foreach\\*(C'> statement " |
| 4190 |
"more rapidly than it would the equivalent C-style CW<\\*(C`for\\*(C'> loop." |
| 4191 |
msgstr "" |
| 4192 |
"Widzisz jakie to proste? Czystsze, bezpieczniejsze i szybsze. Jest czystsze, " |
| 4193 |
"bo mniej tu zamieszania. Jest bezpieczniejsze, bo jeśli między wewnętrzną, a " |
| 4194 |
"zewnętrzną pętlę zostanie później dodany kod, to nie będzie on przypadkiem " |
| 4195 |
"wykonywany. CW<next> jawnie iteruje inną pętlę zamiast przerywania " |
| 4196 |
"wewnętrznej. Jest to szybsze, gdyż perl wywołuje instrukcje CW<foreach> " |
| 4197 |
"szybciej niż równoważnik z pętlą CW<for>." |
| 4198 |
|
| 4199 |
#. type: Plain text |
| 4200 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4201 |
#: opensuse-tumbleweed |
| 4202 |
#, fuzzy |
| 4203 |
#| msgid "" |
| 4204 |
#| "\\s-1BLOCK\\s0 (with or without a label) is equivalent to a loop that " |
| 4205 |
#| "executes once. So you can use loop control statements inside the block to " |
| 4206 |
#| "exit or re-execute it. (Note that this is not true inside CW<eval{}>, " |
| 4207 |
#| "CW<sub{}> or, contrary to popular belief, CW<do{}> blocks, which are not " |
| 4208 |
#| "loops.) The CW<continue> block is optional." |
| 4209 |
msgid "" |
| 4210 |
"A BLOCK by itself (labeled or not) is semantically equivalent to a loop that " |
| 4211 |
"executes once. Thus you can use any of the loop control statements in it to " |
| 4212 |
"leave or restart the block. (Note that this is \\&I<NOT> true in " |
| 4213 |
"CW<\\*(C`eval{}\\*(C'>, CW<\\*(C`sub{}\\*(C'>, or, contrary to popular " |
| 4214 |
"belief, \\&CW<\\*(C`do{}\\*(C'> blocks, which do I<NOT> count as loops.) " |
| 4215 |
"The CW<\\*(C`continue\\*(C'> block is optional." |
| 4216 |
msgstr "" |
| 4217 |
"\\s-1BLOK\\s0 (z etykietą lub bez) jest równoważny pętli, która jest " |
| 4218 |
"wykonywana jeden raz. Tak więc możesz wewnątrz używać instrukcji kontroli " |
| 4219 |
"pętli by wyjść z bloku lub ponowić jego wykonanie. (Zauważ, że nie jest to " |
| 4220 |
"prawdą wewnątrz CW<eval{}>, CW<sub{}> czy, przeciwnie do rozpowszchnionych " |
| 4221 |
"przekonań, bloków CW<do{}>, które nie zaliczają się do pętli.) Blok " |
| 4222 |
"CW<continue> jest opcjonalny." |
| 4223 |
|
| 4224 |
#. type: Plain text |
| 4225 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4226 |
#: opensuse-tumbleweed |
| 4227 |
msgid "" |
| 4228 |
"You\\*(Aqll also find that CW<\\*(C`foreach\\*(C'> loop used to create a " |
| 4229 |
"topicalizer and a switch:" |
| 4230 |
msgstr "" |
| 4231 |
|
| 4232 |
#. type: Plain text |
| 4233 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4234 |
#: opensuse-tumbleweed |
| 4235 |
msgid "" |
| 4236 |
"The CW<\\*(C`switch\\*(C'> feature is discouraged for new code and is " |
| 4237 |
"retained for backward compatibility." |
| 4238 |
msgstr "" |
| 4239 |
|
| 4240 |
#. type: Plain text |
| 4241 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4242 |
#: opensuse-tumbleweed |
| 4243 |
msgid "" |
| 4244 |
"Starting from Perl 5.10.1 (well, 5.10.0, but it didn\\*(Aqt work right), you " |
| 4245 |
"can say" |
| 4246 |
msgstr "" |
| 4247 |
|
| 4248 |
#. type: Plain text |
| 4249 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4250 |
#: opensuse-tumbleweed |
| 4251 |
msgid "" |
| 4252 |
"to enable the switch feature. This is loosely based on an old version of a " |
| 4253 |
"Raku proposal, but it no longer resembles the Raku construct. You also get " |
| 4254 |
"the switch feature whenever you declare that your code prefers to run under " |
| 4255 |
"a version of Perl between 5.10 and 5.34. For example:" |
| 4256 |
msgstr "" |
| 4257 |
|
| 4258 |
#. type: Plain text |
| 4259 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4260 |
#: opensuse-tumbleweed |
| 4261 |
msgid "" |
| 4262 |
"Under the \"switch\" feature, Perl gains the keywords " |
| 4263 |
"\\&CW<\\*(C`given\\*(C'>, CW<\\*(C`when\\*(C'>, CW<\\*(C`default\\*(C'>, " |
| 4264 |
"CW<\\*(C`continue\\*(C'>, and CW<\\*(C`break\\*(C'>. Starting from Perl " |
| 4265 |
"5.16, one can prefix the switch keywords with CW<\\*(C`CORE::\\*(C'> to " |
| 4266 |
"access the feature without a CW<\\*(C`use feature\\*(C'> statement. The " |
| 4267 |
"keywords CW<\\*(C`given\\*(C'> and \\&CW<\\*(C`when\\*(C'> are analogous to " |
| 4268 |
"CW<\\*(C`switch\\*(C'> and \\&CW<\\*(C`case\\*(C'> in other languages -- " |
| 4269 |
"though CW<\\*(C`continue\\*(C'> is not -- so the code in the previous " |
| 4270 |
"section could be rewritten as" |
| 4271 |
msgstr "" |
| 4272 |
|
| 4273 |
#. type: Plain text |
| 4274 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4275 |
#: opensuse-tumbleweed |
| 4276 |
msgid "" |
| 4277 |
"The CW<\\*(C`foreach\\*(C'> is another way to set a topicalizer. If you " |
| 4278 |
"wish to use CW<\\*(C`given\\*(C'>, that could be written like this:" |
| 4279 |
msgstr "" |
| 4280 |
|
| 4281 |
#. type: Plain text |
| 4282 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4283 |
#: opensuse-tumbleweed |
| 4284 |
msgid "Or if you don\\*(Aqt care to play it safe, like this:" |
| 4285 |
msgstr "" |
| 4286 |
|
| 4287 |
#. type: Plain text |
| 4288 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4289 |
#: opensuse-tumbleweed |
| 4290 |
msgid "" |
| 4291 |
"Although not for the faint of heart, Perl does support a " |
| 4292 |
"CW<\\*(C`goto\\*(C'> statement. There are three forms: CW<\\*(C`goto\\*(C'>-" |
| 4293 |
"LABEL, CW<\\*(C`goto\\*(C'>-EXPR, and \\&CW<\\*(C`goto\\*(C'>-&NAME. A " |
| 4294 |
"loop\\*(Aqs LABEL is not actually a valid target for a CW<\\*(C`goto\\*(C'>; " |
| 4295 |
"it\\*(Aqs just the name of the loop." |
| 4296 |
msgstr "" |
| 4297 |
|
| 4298 |
#. type: Plain text |
| 4299 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4300 |
#: opensuse-tumbleweed |
| 4301 |
#, fuzzy |
| 4302 |
#| msgid "" |
| 4303 |
#| "The form goto-\\s-1LABEL\\s0 looks for the statement marked " |
| 4304 |
#| "\\s-1LABEL\\s0 and continues execution there. It cannot be used to enter " |
| 4305 |
#| "constructs that require initialization, such as procedures or foreach " |
| 4306 |
#| "loops. It also cannot be used to enter constructs that are optimized in " |
| 4307 |
#| "some way. It can be used to enter almost anywhere else in the dynamic " |
| 4308 |
#| "scope, including exiting procedures, but it is usually better to use a " |
| 4309 |
#| "construct like last or die. The author of Perl never felt the need to use " |
| 4310 |
#| "this form of goto (in Perl\\*(--C that's a different matter)." |
| 4311 |
msgid "" |
| 4312 |
"The CW<\\*(C`goto\\*(C'>-LABEL form finds the statement labeled with LABEL " |
| 4313 |
"and resumes execution there. It may not be used to go into any construct " |
| 4314 |
"that requires initialization, such as a subroutine or a " |
| 4315 |
"CW<\\*(C`foreach\\*(C'> loop. It also can\\*(Aqt be used to go into a " |
| 4316 |
"construct that is optimized away. It can be used to go almost anywhere else " |
| 4317 |
"within the dynamic scope, including out of subroutines, but it\\*(Aqs " |
| 4318 |
"usually better to use some other construct such as CW<\\*(C`last\\*(C'> or " |
| 4319 |
"CW<\\*(C`die\\*(C'>. The author of Perl has never felt the need to use this " |
| 4320 |
"form of CW<\\*(C`goto\\*(C'> (in Perl, that is--C is another matter)." |
| 4321 |
msgstr "" |
| 4322 |
"Postać goto-\\s-1ETYKIETA\\s0 szuka instrukcji oznaczonej \\s-1ETYKIETĄ\\s0 " |
| 4323 |
"i kontynuuje wykonywanie w tym miejscu. Nie może być używana do wchodzenia " |
| 4324 |
"do wnętrza konstrukcji, które wymagają inicjalizacji, takich jak procedury " |
| 4325 |
"lub pętle foreach. Nie może też być używana do wchodzenia do konstrukcji, " |
| 4326 |
"które są w jakiś sposób optymalizowane. Może być używane do wchodzenia " |
| 4327 |
"prawie we wszystkie inne miejsca w zakresie dynamicznym, łącznie z " |
| 4328 |
"wychodzeniem z procedur, lecz zwykle lepiej jest użyć konstrukcji takiej jak " |
| 4329 |
"last lub die. Autor Perla nigdy nie czuł potrzeby używania tej postaci goto " |
| 4330 |
"(w Perlu\\*(--C to inna sprawa)." |
| 4331 |
|
| 4332 |
#. type: Plain text |
| 4333 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4334 |
#: opensuse-tumbleweed |
| 4335 |
#, fuzzy |
| 4336 |
#| msgid "" |
| 4337 |
#| "The form goto-\\s-1EXPR\\s0 expects a label name whose scope will be " |
| 4338 |
#| "resolved dynamically. This allows the use of computed goto's as in " |
| 4339 |
#| "\\s-1FORTRAN\\s0ie, but is not very recommended if you are optimizing for " |
| 4340 |
#| "program maintenance:" |
| 4341 |
msgid "" |
| 4342 |
"The CW<\\*(C`goto\\*(C'>-EXPR form expects a label name, whose scope will be " |
| 4343 |
"resolved dynamically. This allows for computed CW<\\*(C`goto\\*(C'>s per " |
| 4344 |
"FORTRAN, but isn\\*(Aqt necessarily recommended if you\\*(Aqre optimizing " |
| 4345 |
"for maintainability:" |
| 4346 |
msgstr "" |
| 4347 |
"Postać goto-\\s-1WYRAŻ\\s0 oczekuje nazwy etykiety, której zakres zostanie " |
| 4348 |
"rozwiązany dynamicznie. Umożliwia to stosowanie wyliczanych goto jak w " |
| 4349 |
"\\s-1FORTRAN\\s0ie, lecz nie jest zbyt zalecane jeśli optymalizujesz z uwagi " |
| 4350 |
"na konserwację programu:" |
| 4351 |
|
| 4352 |
#. type: Plain text |
| 4353 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4354 |
#: opensuse-tumbleweed |
| 4355 |
#, fuzzy |
| 4356 |
#| msgid "" |
| 4357 |
#| "In most cases like this, it's usually a much, much better idea to use the " |
| 4358 |
#| "structured flow control mechanisms CW<next>, CW<last>, or CW<redo> rather " |
| 4359 |
#| "than resorting to CW<goto>. For some applications, a pair of CW<eval{}> " |
| 4360 |
#| "and I<die()> for exception processing may also be a reasonable choice." |
| 4361 |
msgid "" |
| 4362 |
"In almost all cases like this, it\\*(Aqs usually a far, far better idea to " |
| 4363 |
"use the structured control flow mechanisms of CW<\\*(C`next\\*(C'>, " |
| 4364 |
"CW<\\*(C`last\\*(C'>, or CW<\\*(C`redo\\*(C'> instead of resorting to a " |
| 4365 |
"CW<\\*(C`goto\\*(C'>. For certain applications, the catch and throw pair of " |
| 4366 |
"\\&CW<\\*(C`eval{}\\*(C'> and B<die()> for exception processing can also be " |
| 4367 |
"a prudent approach." |
| 4368 |
msgstr "" |
| 4369 |
"W większości tego typu przypadków, zazwyczaj dużo, dużo lepszym pomysłem " |
| 4370 |
"jest używanie strukturalnych mechanizmów kontroli przepływu CW<next>, " |
| 4371 |
"CW<last> lub CW<redo>, zamiast zwracać się ku CW<goto>. Dla niektórych " |
| 4372 |
"zastosowań, para CW<eval{}> i I<die()>, służąca do przetwarzania wyjątków " |
| 4373 |
"może być też rozsądnym wyjściem." |
| 4374 |
|
| 4375 |
#. type: Plain text |
| 4376 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4377 |
#: opensuse-tumbleweed |
| 4378 |
msgid "" |
| 4379 |
"Beginning in Perl 5.12, Perl accepts an ellipsis, \"CW<\\*(C`...\\*(C'>\", " |
| 4380 |
"as a placeholder for code that you haven\\*(Aqt implemented yet. When Perl " |
| 4381 |
"5.12 or later encounters an ellipsis statement, it parses this without " |
| 4382 |
"error, but if and when you should actually try to execute it, Perl throws an " |
| 4383 |
"exception with the text CW<\\*(C`Unimplemented\\*(C'>:" |
| 4384 |
msgstr "" |
| 4385 |
|
| 4386 |
#. type: Plain text |
| 4387 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4388 |
#: opensuse-tumbleweed |
| 4389 |
msgid "" |
| 4390 |
"There are some cases where Perl can\\*(Aqt immediately tell the difference " |
| 4391 |
"between an expression and a statement. For instance, the syntax for a block " |
| 4392 |
"and an anonymous hash reference constructor look the same unless " |
| 4393 |
"there\\*(Aqs something in the braces to give Perl a hint. The ellipsis is a " |
| 4394 |
"syntax error if Perl doesn\\*(Aqt guess that the CW<\\*(C`{ ... }\\*(C'> is " |
| 4395 |
"a block. Inside your block, you can use a CW<\\*(C`;\\*(C'> before the " |
| 4396 |
"ellipsis to denote that the \\&CW<\\*(C`{ ... }\\*(C'> is a block and not a " |
| 4397 |
"hash reference constructor." |
| 4398 |
msgstr "" |
| 4399 |
|
| 4400 |
#. type: Plain text |
| 4401 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4402 |
#: opensuse-tumbleweed |
| 4403 |
#, fuzzy |
| 4404 |
#| msgid "" |
| 4405 |
#| "Perl has a mechanism for linking documentation to source code. While " |
| 4406 |
#| "waiting for the start of a new instruction, if the compiler comes across " |
| 4407 |
#| "a line that starts with an equal sign and a word like" |
| 4408 |
msgid "" |
| 4409 |
"Perl has a mechanism for intermixing documentation with source code. While " |
| 4410 |
"it\\*(Aqs expecting the beginning of a new statement, if the compiler " |
| 4411 |
"encounters a line that begins with an equal sign and a word, like this" |
| 4412 |
msgstr "" |
| 4413 |
"Perl posiada mechanizm łączenia dokumentacji z kodem źródłowym. Podczas " |
| 4414 |
"oczekiwania początku nowej instrukcji, jeśli kompilator natrafi na linię, " |
| 4415 |
"rozpoczynającą się od znaku równości i słowa, jak" |
| 4416 |
|
| 4417 |
#. type: Plain text |
| 4418 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4419 |
#: opensuse-tumbleweed |
| 4420 |
#, fuzzy |
| 4421 |
#| msgid "" |
| 4422 |
#| "You probably shouldn't rely on I<warn()>, \"podized\" forever. Not all " |
| 4423 |
#| "translators behave well at this point, and the compiler may become more " |
| 4424 |
#| "picky." |
| 4425 |
msgid "" |
| 4426 |
"You probably shouldn\\*(Aqt rely upon the CW<warn()> being podded out " |
| 4427 |
"forever. Not all pod translators are well-behaved in this regard, and " |
| 4428 |
"perhaps the compiler will become pickier." |
| 4429 |
msgstr "" |
| 4430 |
"Prawdopodobnie nie powinieneś opierać się na I<warn()>, \"wypodowanym\" na " |
| 4431 |
"zawsze. Nie wszystkie translatory zachowują się w tym momencie dobrze i być " |
| 4432 |
"może kompilator stanie się wybredniejszy." |
| 4433 |
|
| 4434 |
#. type: Plain text |
| 4435 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4436 |
#: opensuse-tumbleweed |
| 4437 |
#, fuzzy |
| 4438 |
#| msgid "" |
| 4439 |
#| "Like the C preprocessor, Perl can process line directives. Using them, " |
| 4440 |
#| "you can control Perl's notion of filenames and line numbers in error/" |
| 4441 |
#| "warning messages (especially for strings that are processed with " |
| 4442 |
#| "I<eval()>). The syntax for this mechanism is the same as for most C " |
| 4443 |
#| "preprocessors: it matches the regular expression CW</^#\\es*line\\es+" |
| 4444 |
#| "(\\ed+)\\es*(?:\\es\"([^\"]*)\")?/> with CW<$1>, being the line number, " |
| 4445 |
#| "and CW<$2>, being an optional filename (given in quotes)." |
| 4446 |
msgid "" |
| 4447 |
"Perl can process line directives, much like the C preprocessor. Using this, " |
| 4448 |
"one can control Perl\\*(Aqs idea of filenames and line numbers in error or " |
| 4449 |
"warning messages (especially for strings that are processed with " |
| 4450 |
"CW<eval()>). The syntax for this mechanism is almost the same as for most C " |
| 4451 |
"preprocessors: it matches the regular expression" |
| 4452 |
msgstr "" |
| 4453 |
"Podobnie jak preprocesor C, perl może przetwarzać dyrektywy liniowe. Przy " |
| 4454 |
"ich użyciu, można kontrolować perlowe pojęcie nazw plików i numerów linii w " |
| 4455 |
"komunikatach o błędach/ostrzeżeniach (szczególnie dla łańcuchów, które są " |
| 4456 |
"przetwarzane z I<eval()>). Składnia tego mechanizmu jest taka sama dla jak " |
| 4457 |
"dla większości preprocesorów C: dopasowuje wyrażenie regularne CW</" |
| 4458 |
"^#\\es*line\\es+(\\ed+)\\es*(?:\\es\"([^\"]*)\")?/> do CW<$1>, będącego " |
| 4459 |
"numerem linii i CW<$2>, będącego opcjonalną nazwą pliku (podaną w " |
| 4460 |
"cudzysłowach)." |
| 4461 |
|
| 4462 |
#. type: Plain text |
| 4463 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4464 |
#: opensuse-tumbleweed |
| 4465 |
msgid "" |
| 4466 |
"There is a fairly obvious gotcha included with the line directive: Debuggers " |
| 4467 |
"and profilers will only show the last source line to appear at a particular " |
| 4468 |
"line number in a given file. Care should be taken not to cause line number " |
| 4469 |
"collisions in code you\\*(Aqd like to debug later." |
| 4470 |
msgstr "" |
| 4471 |
|
| 4472 |
#. type: Plain text |
| 4473 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4474 |
#: opensuse-tumbleweed |
| 4475 |
msgid "" |
| 4476 |
"These rules are complicated, but the goal is for them to do what you want " |
| 4477 |
"(even if you don\\*(Aqt quite understand why they are doing it). For " |
| 4478 |
"example:" |
| 4479 |
msgstr "" |
| 4480 |
|
| 4481 |
#. type: Plain text |
| 4482 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4483 |
#: opensuse-tumbleweed |
| 4484 |
msgid "" |
| 4485 |
"Tautologous boolean operators are still going to be optimized away. " |
| 4486 |
"Don\\*(Aqt be tempted to write" |
| 4487 |
msgstr "" |
| 4488 |
|
| 4489 |
#. type: Plain text |
| 4490 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4491 |
#: opensuse-tumbleweed |
| 4492 |
msgid "" |
| 4493 |
"This is somewhat equivalent to the C-style switch statement\\*(Aqs " |
| 4494 |
"fallthrough functionality (not to be confused with I<Perl\\*(Aqs> " |
| 4495 |
"fallthrough functionality--see below), wherein the same block is used for " |
| 4496 |
"several \\&CW<\\*(C`case\\*(C'> statements." |
| 4497 |
msgstr "" |
| 4498 |
|
| 4499 |
#. type: Plain text |
| 4500 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4501 |
#: opensuse-tumbleweed |
| 4502 |
msgid "" |
| 4503 |
"When a CW<\\*(C`given\\*(C'> statement is also a valid expression (for " |
| 4504 |
"example, when it\\*(Aqs the last statement of a block), it evaluates to:" |
| 4505 |
msgstr "" |
| 4506 |
|
| 4507 |
#. type: Plain text |
| 4508 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4509 |
#: opensuse-tumbleweed |
| 4510 |
msgid "" |
| 4511 |
"Currently, CW<\\*(C`given\\*(C'> blocks can\\*(Aqt always be used as proper " |
| 4512 |
"expressions. This may be addressed in a future version of Perl." |
| 4513 |
msgstr "" |
| 4514 |
|
| 4515 |
#. type: Plain text |
| 4516 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4517 |
#: opensuse-tumbleweed |
| 4518 |
msgid "" |
| 4519 |
"Instead of using CW<given()>, you can use a CW<foreach()> loop. For " |
| 4520 |
"example, here\\*(Aqs one way to count how many times a particular string " |
| 4521 |
"occurs in an array:" |
| 4522 |
msgstr "" |
| 4523 |
|
| 4524 |
#. type: Plain text |
| 4525 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4526 |
#: opensuse-tumbleweed |
| 4527 |
msgid "" |
| 4528 |
"At the end of all CW<\\*(C`when\\*(C'> blocks, there is an implicit " |
| 4529 |
"CW<\\*(C`next\\*(C'>. You can override that with an explicit " |
| 4530 |
"CW<\\*(C`last\\*(C'> if you\\*(Aqre interested in only the first match alone." |
| 4531 |
msgstr "" |
| 4532 |
|
| 4533 |
#. type: Plain text |
| 4534 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4535 |
#: opensuse-tumbleweed |
| 4536 |
msgid "" |
| 4537 |
"This doesn\\*(Aqt work if you explicitly specify a loop variable, as in " |
| 4538 |
"CW<\\*(C`for $item (@array)\\*(C'>. You have to use the default variable " |
| 4539 |
"CW<$_>." |
| 4540 |
msgstr "" |
| 4541 |
|
| 4542 |
#. type: Plain text |
| 4543 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4544 |
#: opensuse-tumbleweed |
| 4545 |
msgid "" |
| 4546 |
"The Perl 5 smartmatch and CW<\\*(C`given\\*(C'>/CW<\\*(C`when\\*(C'> " |
| 4547 |
"constructs are not compatible with their Raku analogues. The most visible " |
| 4548 |
"difference and least important difference is that, in Perl 5, parentheses " |
| 4549 |
"are required around the argument to CW<given()> and CW<when()> (except when " |
| 4550 |
"this last one is used as a statement modifier). Parentheses in Raku are " |
| 4551 |
"always optional in a control construct such as CW<if()>, CW<while()>, or " |
| 4552 |
"CW<when()>; they can\\*(Aqt be made optional in Perl 5 without a great deal " |
| 4553 |
"of potential confusion, because Perl 5 would parse the expression" |
| 4554 |
msgstr "" |
| 4555 |
|
| 4556 |
#. type: Plain text |
| 4557 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4558 |
#: opensuse-tumbleweed |
| 4559 |
msgid "" |
| 4560 |
"But it doesn\\*(Aqt work at all in Raku. Instead, you should use the " |
| 4561 |
"(parallelizable) CW<\\*(C`any\\*(C'> operator:" |
| 4562 |
msgstr "" |
| 4563 |
|
| 4564 |
#. type: Plain text |
| 4565 |
#: fedora-44 fedora-rawhide mageia-cauldron opensuse-leap-16-1 |
| 4566 |
#: opensuse-tumbleweed |
| 4567 |
msgid "" |
| 4568 |
"The table of smartmatches in \"Smartmatch Operator\" in perlop is not " |
| 4569 |
"identical to that proposed by the Raku specification, mainly due to " |
| 4570 |
"differences between Raku\\*(Aqs and Perl 5\\*(Aqs data models, but also " |
| 4571 |
"because the Raku spec has changed since Perl 5 rushed into early adoption." |
| 4572 |
msgstr "" |
| 4573 |
|
| 4574 |
#. type: TH |
| 4575 |
#: fedora-rawhide |
| 4576 |
#, no-wrap |
| 4577 |
msgid "2026-03-30" |
| 4578 |
msgstr "30 marca 2026 r." |
| 4579 |
|
| 4580 |
#. type: TH |
| 4581 |
#: fedora-rawhide |
| 4582 |
#, no-wrap |
| 4583 |
msgid "perl v5.42.2" |
| 4584 |
msgstr "perl v5.42.2" |
| 4585 |
|
| 4586 |
#. type: TH |
| 4587 |
#: mageia-cauldron |
| 4588 |
#, no-wrap |
| 4589 |
msgid "2025-06-24" |
| 4590 |
msgstr "24 czerwca 2025 r." |
| 4591 |
|
| 4592 |
#. type: TH |
| 4593 |
#: mageia-cauldron |
| 4594 |
#, no-wrap |
| 4595 |
msgid "perl v5.42.0" |
| 4596 |
msgstr "perl v5.42.0" |