forked from szabgab/screencasts
-
Notifications
You must be signed in to change notification settings - Fork 1
/
spanish.sbv
1418 lines (977 loc) · 25.5 KB
/
spanish.sbv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
.0:00:00.919,0:00:02.660
Hola! Bienvenidos de nuevo al canal!
0:00:02.660,0:00:05.530
Esta vez voy a hablar de
0:00:05.530,0:00:08.060
estructuras de datos en Perl.
0:00:08.060,0:00:08.809
Especialmente, esta
0:00:08.809,0:00:11.989
presentación será sobre escalares.
0:00:11.989,0:00:16.669
Entonces puedes ver aquí el IDE Padre.
Esta es una versión de desarrollo.
0:00:16.669,0:00:21.309
Y la primera cosa que debes hacer
es crear un nuevo
0:00:21.309,0:00:22.920
script de Perl 5.
0:00:22.920,0:00:26.239
Sólo tiene el shebang, luego
0:00:26.239,0:00:28.949
la instrucción "use".
0:00:28.949,0:00:32.580
Así que, Perl tiene tres tipos de
0:00:32.580,0:00:36.350
estructuras de datos: escalares, arrays
y hashes.
0:00:36.350,0:00:38.499
Escalares pueden contener
0:00:38.499,0:00:42.869
un número o una cadena de caractereres
o referencias a una de las estructuras
0:00:42.869,0:00:44.910
de datos complejas.
0:00:44.910,0:00:48.410
Pero vamos a hablar de eso más adelante.
0:00:48.410,0:00:51.810
Cada una de estas
0:00:51.810,0:00:54.060
tiene su propio signo específico,
0:00:54.060,0:00:55.379
lo que llamamos sigil
0:00:55.379,0:00:58.850
que es el primer carácter del nombre
de la variable.
0:00:58.850,0:01:03.550
Entonces los escalares tienes el signo del dólar($),
los arrays tienes el signo de arroba(@), y en los
0:01:03.550,0:01:08.260
hashes que también se llaman diccionarios
o tablas de búsqueda
0:01:08.260,0:01:10.960
son los signos de porcentaje(%).
0:01:10.960,0:01:13.250
Ahora vamos a hablar de
variables
0:01:13.250,0:01:17.799
escalares, cada variable escalar
siempre comienza con un signo del dólar($)
0:01:17.799,0:01:18.670
y luego
0:01:18.670,0:01:20.620
letras y números
0:01:20.620,0:01:25.010
y caracteres de subrayado. Así, por ejemplo, puedes
tener una variable como esta
0:01:25.010,0:01:26.390
o
0:01:26.390,0:01:28.020
un solo valor
0:01:28.020,0:01:30.049
o puedes tener
0:01:30.049,0:01:31.880
nombre largo ($long_name)
0:01:31.880,0:01:35.509
que tiene letras minúsculas
0:01:35.509,0:01:38.770
y caracteres de subrayado entre las palabras
0:01:38.770,0:01:42.040
o puedes tener
0:01:42.040,0:01:44.020
Esto Es
0:01:44.020,0:01:46.160
Un Nombre Largo ($ThisisALongName)
0:01:46.160,0:01:47.860
este estilo, aunque
0:01:47.860,0:01:48.990
toda la comunidad
0:01:48.990,0:01:52.800
prefiere la versión anterior
donde tienes todas en minúsculas
0:01:52.800,0:01:54.229
todos los nombres
0:01:54.229,0:01:57.230
y caracteres de subrayado entre las
variables
0:01:57.230,0:02:00.690
Ahora, debido a que está utilizando la instrucción "use strict"
0:02:00.690,0:02:05.439
siempre tendrás que declarar todas las variables
usando la palabra clave "my"
0:02:05.439,0:02:07.360
Entonces, declaro mi variable
0:02:07.360,0:02:08.719
"my $nombre"
0:02:08.719,0:02:11.359
y coloco "foo"
0:02:11.359,0:02:14.319
Y luego podre imprimir, perdón,
0:02:14.319,0:02:17.949
Yo puedo imprimir esa variable
0:02:17.949,0:02:19.859
Así que si presionó F5 ahora
0:02:19.859,0:02:20.969
entonces va a ...
0:02:20.969,0:02:22.989
Necesito en primer lugar, guardar el script
0:02:22.989,0:02:25.059
así que lo voy a llamar script.pl
0:02:25.059,0:02:26.500
Y
0:02:26.500,0:02:30.309
abrirá una ventana independiente donde se va a
imprimir el resultado de "foo"
0:02:30.309,0:02:34.680
Y eso es algo que esta ventana
hace por mí.
0:02:34.680,0:02:38.989
Así que este es el camino. Primero declaramos
una variable. Es "my" y luego
0:02:38.989,0:02:40.260
le asignamos
0:02:40.260,0:02:43.379
valor a esta variable y luego podemos
imprimirlo
0:02:43.379,0:02:44.460
No tenemos que
0:02:44.460,0:02:46.669
asignar inmediatamente. Así que podriamos
0:02:46.669,0:02:51.739
declarar la variable y luego
asignar un valor. Si lo ejecuto
0:02:51.739,0:02:55.109
Obtengo el mismo resultado.
0:02:55.109,0:02:59.699
Normalmente preferimos la primera versión. Así que si
la lógica del código lo permite
0:02:59.699,0:03:01.709
entonces usted debe
0:03:01.709,0:03:05.689
inmediatamente, en el momento de la declaración,
asignar un valor
0:03:05.689,0:03:10.189
Pero eso no siempre es posible.
Así que hay casos en los que hay que
0:03:10.189,0:03:14.739
primero declarar una variable y sólo más tarde
podras asignar un valor.
0:03:14.739,0:03:16.779
Ahora lo que ocurre con un valor si ...
0:03:16.779,0:03:20.159
... Cuando no está definido,
0:03:20.159,0:03:23.569
no tiene un valor, así que
Yo solamente lo declaro.
0:03:23.569,0:03:26.579
Tiene un valor que se llama "undef".
0:03:26.579,0:03:31.649
Esta indefinido. Es
similar a "NULL" en ..
0:03:31.649,0:03:32.649
0:03:32.649,0:03:36.509
Es similar a "NULL" en bases de datos
pero tiene un comportamiento ligeramente diferente.
0:03:36.509,0:03:39.890
Entonces por ejemplo podemos comprobar
si ese valor,
0:03:39.890,0:03:41.879
que tiene esa variable
0:03:41.879,0:03:46.339
tiene otro valor o si
solo tiene "undef".
0:03:46.339,0:03:52.859
Podemos usar esta palabra clave "defined".
Para preguntar si esta definida
y luego imprimir
0:03:52.859,0:03:54.719
"say 'defined'"
0:03:54.719,0:03:57.459
"else"
0:03:57.459,0:04:00.159
entonces nosotros colocamos "say 'no'"
0:04:00.159,0:04:01.920
Y luego si yo ejecutó este código
0:04:01.920,0:04:03.649
tu veras "no".
0:04:03.649,0:04:06.369
Y luego "foo".
0:04:06.369,0:04:08.999
Por contrario si tomo el mismo código
0:04:08.999,0:04:10.069
y
0:04:10.069,0:04:13.189
lo coloco después de la asignación
0:04:13.189,0:04:15.709
entonces verás que en un principio dice "no"
0:04:15.709,0:04:16.639
luego
0:04:16.639,0:04:19.039
dice que está definido y luego dice que
0:04:19.039,0:04:20.259
ya tiene
0:04:20.259,0:04:21.979
el valor "foo" porque
0:04:21.979,0:04:24.610
la impresión del valor es después
0:04:24.610,0:04:25.979
de actualmente
0:04:25.979,0:04:28.250
imprimir el "defined".
0:04:28.250,0:04:32.430
Así puedes ver que el aquí todavía no estaba
definido, aquí le asignamos un valor y
0:04:32.430,0:04:36.040
aquí se convirtió definido.
0:04:36.040,0:04:38.990
Más tarde podemos establecer el valor a
0:04:38.990,0:04:43.490
"undef" de nuevo. Así que más adelante, por
ejemplo, aqui podemos decir que ($name)
0:04:43.490,0:04:44.659
es igual a
0:04:44.659,0:04:46.479
"undef"
0:04:46.479,0:04:49.210
Dejame solamente no copiar-pegar
el mismo código.
0:04:49.210,0:04:54.899
En este punto, su valor
es "undef" otra vez
0:04:54.899,0:04:56.370
Ahora, las variables
0:04:56.370,0:04:59.319
pueden contener números o cadena de caracteres.
0:04:59.319,0:05:01.169
entonces puedes...
0:05:01.169,0:05:03.710
Vamos a empezar de nuevo
0:05:03.710,0:05:06.159
Puedes declarar una variable, digamos
0:05:06.159,0:05:09.030
"$x"
0:05:09.030,0:05:11.179
Y colocarlo en una cadena de caracteres.
0:05:11.179,0:05:12.249
Colocar una cadena de caracteres a dentro de el
0:05:12.249,0:05:15.639
Y luego puedes imprimir la variable
0:05:15.639,0:05:19.210
Y luego puedes asignar a la
misma variable un número
0:05:19.210,0:05:21.800
Y luego puedes imprimir la variable otra vez
0:05:21.800,0:05:24.769
Y si ejecutó el codigo, entonces verás que
0:05:24.769,0:05:27.809
primero era una cadena de caracteres y luego era un número
0:05:27.809,0:05:30.529
Y a Perl no le importa. Perl no tiene
0:05:30.529,0:05:33.870
tipos conectados a estas variables
0:05:33.870,0:05:36.410
no tiene nada de eso
0:05:36.410,0:05:40.699
Así que todo eso
0:05:40.699,0:05:42.249
lo trabaja operadores.
0:05:42.249,0:05:43.740
Entonces en otro lenguaje
0:05:43.740,0:05:46.060
puede ser que estes acostumbrado
0:05:46.060,0:05:47.199
al hecho de que
0:05:47.199,0:05:50.610
diferentes valores, diferentes variables
0:05:50.610,0:05:52.559
basados en el tipo de las variables
0:05:52.559,0:05:53.639
los operadores
0:05:53.639,0:05:55.930
se comportan de manera diferente.
0:05:55.930,0:05:57.099
En Perl
0:05:57.099,0:05:59.620
Es al revés
0:05:59.620,0:06:01.960
Ni variables ni
0:06:01.960,0:06:03.599
operandos
0:06:03.599,0:06:06.230
deciden lo que el operador va a hacer.
0:06:06.230,0:06:11.460
Pero el operador decidirá como
los operandos, las variables se comportan.
0:06:11.460,0:06:17.630
Así que vamos a empezar a usar otro ejemplo
Digamos que yo tengo "$z"
0:06:17.630,0:06:19.620
es igual a 3
0:06:19.620,0:06:25.180
Yo solamente tengo que imprimirlo y tendre
otra variable llamada
0:06:25.180,0:06:26.889
Digamos que "$y"
0:06:26.889,0:06:28.800
es igual a 4
0:06:28.800,0:06:29.869
y luego
0:06:29.869,0:06:32.749
lo imprimo tambien
0:06:32.749,0:06:37.030
Y entonces, ¿qué haremos? Así que vamos a
tratar de
0:06:37.030,0:06:40.400
tomar "$z" y agregar "$y" a el
0:06:40.400,0:06:42.789
Y entonces también vamos a tratar de
0:06:42.789,0:06:47.330
tomar "$z"
0:06:47.330,0:06:50.919
y concatenar "$y" para que puedan
0:06:50.919,0:06:52.189
estar juntos, los dos
0:06:52.189,0:06:54.119
valores
0:06:54.119,0:06:58.609
y la tercera diremos
0:06:58.609,0:07:00.480
"$z x $y" que es el multiplicador
0:07:00.480,0:07:02.209
o um...
0:07:02.209,0:07:05.449
o variable de repeticiones
0:07:05.449,0:07:08.210
operador, perdón
0:07:08.210,0:07:11.300
Así que si yo ejecuto el código, qué tenemos aquí
0:07:11.300,0:07:14.550
En primer lugar, imprime los dos valores
3 y 4
0:07:14.550,0:07:15.879
Luego el más
0:07:15.879,0:07:19.770
es adición, una adición numérica así que
se llevará los dos valores
0:07:19.770,0:07:25.379
dos variables escalares de los valores
3 y 4 y sumarlos como números
0:07:25.379,0:07:26.389
Luego el punto
0:07:26.389,0:07:27.949
es una concatenación
0:07:27.949,0:07:29.639
Así que tomara dos cadenas de caracteres
0:07:29.639,0:07:33.249
y básicamente convierte los dos
números en dos cadenas de caracteres
0:07:33.249,0:07:34.709
y los imprime
0:07:34.709,0:07:36.920
concatenados 3 y 4
0:07:36.920,0:07:38.530
o 34 si quieres
0:07:38.530,0:07:39.999
ver esto como un número.
0:07:39.999,0:07:43.529
Y la última es la repetición así que toma
el lado izquierdo
0:07:43.529,0:07:45.359
que contiene "$z"
0:07:45.359,0:07:46.759
y lo toma como una cadena de caracteres
0:07:46.759,0:07:47.409
y luego
0:07:47.409,0:07:49.340
lo repite
0:07:49.340,0:07:50.349
todas las
0:07:50.349,0:07:53.400
veces que tengas en el
lado derecho.
0:07:53.400,0:07:56.189
Así que porque en el lado izquierdo
tienes la cadena de caracteres "3"
0:07:56.189,0:08:00.349
y en el lado derecho tienes el número 4
0:08:00.349,0:08:03.210
tendrá 4 veces el
0:08:03.210,0:08:05.499
carácter "3"
0:08:05.499,0:08:06.870
Así como puedes ver
0:08:06.870,0:08:08.159
el operador
0:08:08.159,0:08:09.789
es el que le dice
0:08:09.789,0:08:12.800
a los operandos cómo comportarse ya sea como números
0:08:12.800,0:08:15.499
o como cadenas de caracteres
0:08:15.499,0:08:17.069
Pero qué sucede si
0:08:17.069,0:08:18.189
uno de estos
0:08:18.189,0:08:19.669
en realidad no son números
0:08:19.669,0:08:22.460
Qué sucederá si estos son
0:08:22.460,0:08:24.649
dos cadenas de caracteres
0:08:24.649,0:08:26.509
Si ejecuto el código ahora
0:08:26.509,0:08:28.729
veremos que el resultado es el mismo
0:08:28.729,0:08:30.740
porque Perl automáticamente convierte
0:08:30.740,0:08:32.590
números a cadenas de caracteres
0:08:32.590,0:08:35.310
y cadenas de caracteres a números cuando sea necesario
0:08:35.310,0:08:38.260
cuando el operador lo requiere.
0:08:38.260,0:08:41.480
Eso está bien. Y qué pasa si sólo uno
0:08:41.480,0:08:42.850
de ellos es una cadena de caracteres
0:08:42.850,0:08:46.860
y el otro es un número?
Hay que ver esto. Que pasa en
0:08:46.860,0:08:48.370
este caso?
0:08:48.370,0:08:50.790
Si ejecuto el código, y lo mismo!
0:08:50.790,0:08:52.820
Así que a Perl no le importa, si puedes...
0:08:52.820,0:08:54.590
Lo convierte automáticamente
0:08:54.590,0:08:56.930
o no, si tu prefieres
0:08:56.930,0:09:01.060
números a cadenas de caracteres y las cadenas de caracteres
a números cada vez que
0:09:01.060,0:09:03.750
es necesario
0:09:03.750,0:09:04.789
Eso está bien
0:09:04.789,0:09:06.300
en el caso general.
0:09:06.300,0:09:07.660
Pero hay otros casos
0:09:07.660,0:09:09.270
cuando...
0:09:09.270,0:09:11.220
Esta conversión no puede ser
0:09:11.220,0:09:13.600
cien por ciento
0:09:13.600,0:09:16.960
Qué sucede si el valor es por ejemplo
0:09:16.960,0:09:20.890
"3.14 is pi"
0:09:20.890,0:09:22.540
En primer lugar, por cierto
0:09:22.540,0:09:27.090
en esta conversión, la idea se llama
contexto
0:09:27.090,0:09:29.550
La razón que
0:09:29.550,0:09:31.910
Perl esta convertiendo los numeros es porque
0:09:31.910,0:09:35.140
Perl tiene contexto así que tenemos contexto numérico
0:09:35.140,0:09:37.290
y contexto de cadena de caracteres.
0:09:37.290,0:09:41.610
Contexto numérico y contexto de cadena de caracteres.
0:09:41.610,0:09:44.470
Lo escribiré aqui
0:09:44.470,0:09:46.250
Para que no te tengas que preocupar de mi
0:09:46.250,0:09:48.260
pronunciación
0:09:48.260,0:09:52.160
De cualquier manera lo que pasa en este caso es que
Ahora tienes un número - 3
0:09:52.160,0:09:54.040
y la cadena de caracteres que
0:09:54.040,0:09:56.209
en realidad no es convertible a un número
0:09:56.209,0:09:57.100
directamente.
0:09:57.100,0:10:01.390
Que pasa ahora, si ejecuto este código
0:10:01.390,0:10:03.140
Vamos a ver.
0:10:03.140,0:10:06.870
Lo primero es 3, el numero 3 que
fue imprimido. Eso está bien.
0:10:06.870,0:10:10.670
Luego tomo "3.14 is pi"
0:10:10.670,0:10:14.910
que solo esta imprimiendo de
el contenido "$y".
0:10:14.910,0:10:17.750
Luego tengo esta advertencia
0:10:17.750,0:10:20.370
y el resultado "6.14".
0:10:20.370,0:10:25.350
Esta advertencia esta alli porque estamos
tratando de usar
0:10:25.350,0:10:26.520
esta cadena de caracteres
0:10:26.520,0:10:28.120
en un contexto numérico
0:10:28.120,0:10:30.780
en adición en la linea...
0:10:30.780,0:10:33.250
Pues dice doce. Sí, en esta línea
0:10:33.250,0:10:36.960
Así que esta es la línea. Ahora lo podemos ver.
0:10:36.960,0:10:42.210
Perdón.
0:10:42.210,0:10:43.890
Sí! En esta ventana.
0:10:43.890,0:10:49.740
Así que puedes ver esto aquí.
0:10:49.740,0:10:51.520
Esto es la cadena de caracteres. Esto es lo que
0:10:51.520,0:10:53.820
se convirtió en un número.
0:10:53.820,0:10:56.990
Así que obtenemos una advertencia. Ahora esta advertencia la obtenemos
solamente porque
0:10:56.990,0:10:59.500
tú pediste por una advertencia.
0:10:59.500,0:11:03.260
Así que es importante usar estas advertencias.
De lo contrario haría algo
0:11:03.260,0:11:05.440
en silencio, en lo cual podría ser lo que quieres
0:11:05.440,0:11:08.750
pero eso podría indicar algún tipo de problema.
0:11:08.750,0:11:10.529
Así que ahora es
0:11:10.529,0:11:12.860
"3.14 is pi"
0:11:12.860,0:11:17.030
Pero en la adición se utiliza realmente
solamente "3.14"
0:11:17.030,0:11:19.160
Lo que Perl hace es que
0:11:19.160,0:11:21.440
toma el lado izquierdo de la cadena de caracteres
0:11:21.440,0:11:22.880
y
0:11:22.880,0:11:24.060
mira
0:11:24.060,0:11:27.829
lo mira y trata de usarlo como un número.
0:11:27.829,0:11:32.160
Y hay un punto. Hay un espacio aquí.
Pero
0:11:32.160,0:11:35.249
se detiene. No lo puede
convertir a un número
0:11:35.249,0:11:38.750
Entonces desde ese momento se ignorará el
valor.
0:11:38.750,0:11:40.430
Así que por esa razón
0:11:40.430,0:11:41.940
Perl
0:11:41.940,0:11:44.809
utiliza "3.14"
0:11:44.809,0:11:46.020
como el valor
0:11:46.020,0:11:48.550
de "$y" en esta suma.
0:11:48.550,0:11:49.910
Luego, lo que
0:11:49.910,0:11:52.620
tal vez piensas es que le paso a "$y".
0:11:52.620,0:11:54.000
Fue convertido?
0:11:54.000,0:11:55.579
O sólo para el uso
0:11:55.579,0:11:56.930
de esta suma?
0:11:56.930,0:11:57.990
Así que puedes ver
0:11:57.990,0:11:59.300
en esta concatenación.
0:11:59.300,0:12:00.110
Que aquí
0:12:00.110,0:12:03.519
obtenemos en realidad el "3"
del "$z".
0:12:03.519,0:12:06.530
Y el "3.14 is pi"
0:12:06.530,0:12:10.330
viniendo de "$y". Así que puedes ver
que "$y" no cambio.
0:12:10.330,0:12:12.070
"$y"
0:12:12.070,0:12:14.010
sigue siendo la misma cadena de caracteres.
0:12:14.010,0:12:15.970
Y luego si miras a la tercera
0:12:15.970,0:12:18.370
veras que es "$z"
0:12:18.370,0:12:20.100
"$y" veces
0:12:20.100,0:12:22.790
Ahora tu probablemente supones que
veras
0:12:22.790,0:12:26.070
3.14 veces la letra 3 pero
0:12:26.070,0:12:31.080
Perl no lo puede imprimir...
0:12:31.080,0:12:32.870
Sólo puede imprimir
0:12:32.870,0:12:34.960
los números completos así que en este caso...
0:12:34.960,0:12:36.200
Así que
0:12:36.200,0:12:39.670
convertirá el "3.14"
a "3" y luego va usarlo
0:12:39.670,0:12:41.590
para la multiplicación
0:12:41.590,0:12:42.880
para la repetición
0:12:42.880,0:12:44.920
Pero no ves la advertencia otra vez
0:12:44.920,0:12:47.360
como normalmente esperarías
0:12:47.360,0:12:49.040
Entonces qué?
0:12:49.040,0:12:50.190
Será porque...
0:12:50.190,0:12:53.190
debido a que esta operación no
genera la advertencia?
0:12:53.190,0:12:56.240
Así que haremos clic aquí y luego
0:12:56.240,0:12:58.100
comentar...
0:12:58.100,0:12:59.990
comentar el código aquí.
0:12:59.990,0:13:01.370
Y ejecutarlo de nuevo.
0:13:01.370,0:13:02.870
Y ahora podras
0:13:02.870,0:13:05.080
ver que la advertencia está en la
0:13:05.080,0:13:06.560
repetición.
0:13:06.560,0:13:09.010
Así que antes no miramos
0:13:09.010,0:13:11.220
esa advertencia.
0:13:11.220,0:13:15.350
Y por qué no la miramos? Porque no había
advertencia. Y la razón es que
0:13:15.350,0:13:17.120
en el momento, aquí
0:13:17.120,0:13:19.530
Cuando la suma
0:13:19.530,0:13:21.940
causo que Perl convertiera
0:13:21.940,0:13:26.399
la cadena de caracteres a el número luego
realmente reservo ese número nuevo
0:13:26.399,0:13:27.920
en un lugar mágico
0:13:27.920,0:13:30.050
en "$y"
0:13:30.050,0:13:34.010
Así que desde ese momento "$y" en realidad