| tybalt89 | (and are global, sometimes a bad thing) |
| Hmmhesays | so my $tty_id = open($tty, "/dev/ttyS0") |
| tybalt89 | no !!!!!!!!!!!!!!!!!! |
| Hmmhesays | ruh roh, i'm really new at this so guide me oh master |
| f00li5h | "you can't just make shit up and hope the computer understands" |
| tybalt89 | open(my $tty,"+</dev/ttyS0") or die "can't open file\n"; |
| Hmmhesays | so you are declaring your variable within the open function |
| tybalt89 | sure :) |
| Hmmhesays | would that be the same is declaring my $tty; open($tty,"+</dev/ttyS0") or die "can't open file\n"; |
| tybalt89 | yes |
| yubimusubi | yes |
| Hmmhesays | ok, I understand |
| f00li5h | nearly |
| Hmmhesays | nearly? |
| f00li5h | if you declare $tty, outside the open, you can use it in the C< or ... > part too </pedant> i'm so very glad i'm the one that marked up the HTML for this dude |
| tybalt89 | doesn't help sice it's undefined in the or part since |
| f00li5h | tybalt89: yes, but if you declare it in the open, it's undeclared |
| tybalt89 | f00li5h: what? |
| f00li5h | the distinction is more for open $my fh, '<', my $filename = "foo" or die "Can't open $filename: $!"; aaw, no filename yet -_- |
| tybalt89 | f00li5h: well, we were talking about $fh, not the filename |
| ofer | how can I tell what's the difference between timestamps ? |
| f00li5h | tybalt89: yes, i see that, but $fh obeys the same scoping rules as $filename |
| ofer | for example, 2005-07-01 vs 2008-02-29 |
| tybalt89 | define "timestamp" |
| cfedde | what are you opening if it;s not defined. |
| ArmOrAttAk | subtraction |
| f00li5h | ofer: you can compare them with gt ge etc |
| ofer | I want to know that the diff is 2 years, 5 months, ... |
| f00li5h | ofer: because those time stamps will copare nicely |
| cfedde | ofer: use one of the fancy DateTime:: oarser modules parser |
| tybalt89 | f00li5h: sure, but $fh has no use in the or part |
| f00li5h | tybalt89: this is true |
| action | QtPlatypus often cheats and gets MySQL to do thouse types of things. |
| QtPlatypus | often cheats and gets MySQL to do thouse types of things. |
| f00li5h | tybalt89: but the answer is still "nearly" and not "yes" |
| tybalt89 | no it's not |