From jay at jays.net Mon Nov 2 10:21:27 2015 From: jay at jays.net (Jay Hannah) Date: Mon, 2 Nov 2015 12:21:27 -0600 Subject: [Omaha.pm] Nov 3 meeting? Message-ID: <013692BD-7D3F-4B01-A65E-C16E156DEAC3@jays.net> Hey all, Tomorrow's our date again. I won't be there, I'm taking a Do Space tour: http://www.meetup.com/Open-Nebraska-Meetup/events/226032844/ Come check out Do Space! You've heard about it at many of our events, and now's your chance to check it out before it opens to the general public. One of Open Nebraska's co-founders, Rebecca Stavick, is the Executive Director of Do Space and will show us around. The tour will start promptly at 6:00 PM and last about 30 minutes. Do Space opens to the public on Saturday, November 7, 2015. Learn more at http://www.dospace.org. (Do Space is located in the old Borders building, southwest corner of 72nd and Dodge.) http://www.meetup.com/Open-Nebraska-Meetup/events/226032844/ Y'all are welcome to join, RSVP on meetup.com. :) Cheers, Jay Hannah 402-598-7782 From chamelaeon at gmail.com Tue Nov 3 05:57:43 2015 From: chamelaeon at gmail.com (Chamelaeon Wombatowski) Date: Tue, 03 Nov 2015 13:57:43 +0000 Subject: [Omaha.pm] [OMG!Code] Nov 3 meeting? In-Reply-To: <013692BD-7D3F-4B01-A65E-C16E156DEAC3@jays.net> References: <013692BD-7D3F-4B01-A65E-C16E156DEAC3@jays.net> Message-ID: Neat. I'm definitely in. On Mon, Nov 2, 2015 at 12:23 PM Jay Hannah wrote: > Hey all, > > Tomorrow's our date again. I won't be there, I'm taking a Do Space tour: > > http://www.meetup.com/Open-Nebraska-Meetup/events/226032844/ > > Come check out Do Space! You've heard about it at many of our events, > and now's your chance to check it out before it opens to the general > public. One of Open Nebraska's co-founders, Rebecca Stavick, is the > Executive Director of Do Space and will show us around. > > The tour will start promptly at 6:00 PM and last about 30 minutes. > > Do Space opens to the public on Saturday, November 7, 2015. Learn more > at http://www.dospace.org. > > (Do Space is located in the old Borders building, southwest corner of > 72nd and Dodge.) > > http://www.meetup.com/Open-Nebraska-Meetup/events/226032844/ > > Y'all are welcome to join, RSVP on meetup.com. :) > > Cheers, > > Jay Hannah > 402-598-7782 > > > > -- > OMG!Code http://code.omahamakergroup.org > --- > You received this message because you are subscribed to the Google Groups > "OMG!Code" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to omg-code+unsubscribe at googlegroups.com. > Visit this group at http://groups.google.com/group/omg-code. > For more options, visit https://groups.google.com/d/optout. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pmhanson at gmail.com Thu Nov 12 15:26:00 2015 From: pmhanson at gmail.com (Paul Hanson) Date: Thu, 12 Nov 2015 17:26:00 -0600 Subject: [Omaha.pm] Hello Perl Gurus Message-ID: I have a perl script someone else wrote with some issues and I wonder if you all could take a quick glance and tell me where it's gone wrong. I have a lot of files on a fileshare which are clinical data that hospitals upload to us. I'm just trying to figure out how much space each hospital is consuming. Attached are csv files and a perl script. The hospitals data is just reference information (a numeric ID) and the other files are, I think, reference for a specific month. There is no sensitive data included here. We're getting an error, like this one; Can't stat /share/prdv2Images/patient/?/?4/?494810: No such file or directory at getPatientFileSizes.pl line 44 Can't stat /share/prdv2Images/patient/?/?4/?494810: No such file or directory at getPatientFileSizes.pl line 46 Can't use an undefined value as an ARRAY reference at getPatientFileSizes.pl line 48, line 1. I appreciate your time and feedback whenever you have a chance to look at this. -Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From djgoku at gmail.com Thu Nov 12 16:45:01 2015 From: djgoku at gmail.com (Jonathan Otsuka) Date: Thu, 12 Nov 2015 18:45:01 -0600 Subject: [Omaha.pm] Hello Perl Gurus In-Reply-To: References: Message-ID: <631B03FA-CF91-4F57-9B7F-DC48FD57EDAC@gmail.com> I don't see any attachments. Does the two subdirectories under patient really Unicode characters? Jonathan Otsuka > On Nov 12, 2015, at 5:26 PM, Paul Hanson wrote: > > I have a perl script someone else wrote with some issues and I wonder if you all could take a quick glance and tell me where it's gone wrong. > > I have a lot of files on a fileshare which are clinical data that hospitals upload to us. I'm just trying to figure out how much space each hospital is consuming. Attached are csv files and a perl script. The hospitals data is just reference information (a numeric ID) and the other files are, I think, reference for a specific month. There is no sensitive data included here. > > We're getting an error, like this one; > > Can't stat /share/prdv2Images/patient/?/?4/?494810: No such file or directory > > at getPatientFileSizes.pl line 44 > > Can't stat /share/prdv2Images/patient/?/?4/?494810: No such file or directory > > at getPatientFileSizes.pl line 46 > > Can't use an undefined value as an ARRAY reference at getPatientFileSizes.pl line 48, line 1. > > I appreciate your time and feedback whenever you have a chance to look at this. > > -Paul > > _______________________________________________ > Omaha-pm mailing list > Omaha-pm at pm.org > http://mail.pm.org/mailman/listinfo/omaha-pm -------------- next part -------------- An HTML attachment was scrubbed... URL: From pmhanson at gmail.com Thu Nov 12 16:50:04 2015 From: pmhanson at gmail.com (Paul Hanson) Date: Thu, 12 Nov 2015 18:50:04 -0600 Subject: [Omaha.pm] Hello Perl Gurus In-Reply-To: <631B03FA-CF91-4F57-9B7F-DC48FD57EDAC@gmail.com> References: <631B03FA-CF91-4F57-9B7F-DC48FD57EDAC@gmail.com> Message-ID: Sorry. Hopefully they are attached now. The subdirectories should not contain unicode characters. On Nov 12, 2015 19:45, "Jonathan Otsuka" wrote: > I don't see any attachments. Does the two subdirectories under patient > really Unicode characters? > > Jonathan Otsuka > > On Nov 12, 2015, at 5:26 PM, Paul Hanson wrote: > > I have a perl script someone else wrote with some issues and I wonder if > you all could take a quick glance and tell me where it's gone wrong. > > I have a lot of files on a fileshare which are clinical data that > hospitals upload to us. I'm just trying to figure out how much space each > hospital is consuming. Attached are csv files and a perl script. The > hospitals data is just reference information (a numeric ID) and the other > files are, I think, reference for a specific month. There is no sensitive > data included here. > > We're getting an error, like this one; > > Can't stat /share/prdv2Images/patient/?/?4/?494810: No such file or > directory > > at getPatientFileSizes.pl line 44 > > Can't stat /share/prdv2Images/patient/?/?4/?494810: No such file or > directory > > at getPatientFileSizes.pl line 46 > > Can't use an undefined value as an ARRAY reference at > getPatientFileSizes.pl line 48, line 1. > > I appreciate your time and feedback whenever you have a chance to look at > this. > > -Paul > > _______________________________________________ > Omaha-pm mailing list > Omaha-pm at pm.org > http://mail.pm.org/mailman/listinfo/omaha-pm > > > _______________________________________________ > Omaha-pm mailing list > Omaha-pm at pm.org > http://mail.pm.org/mailman/listinfo/omaha-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: hospitals_datastorage.zip Type: application/zip Size: 109687 bytes Desc: not available URL: From sidney.omaha.pm at gmail.com Thu Nov 12 23:50:44 2015 From: sidney.omaha.pm at gmail.com (Sidney B) Date: Fri, 13 Nov 2015 01:50:44 -0600 Subject: [Omaha.pm] Hello Perl Gurus In-Reply-To: References: <631B03FA-CF91-4F57-9B7F-DC48FD57EDAC@gmail.com> Message-ID: Your script says: # EDIT BELOW: this is the root directory where the patient files are my $patientFileRoot = "/mnt/images/patient"; I don't think that directory is available on your new system. You need to locate the /images/patient directory and edit the path to it. "mnt/" usually means you've mounted something (like a cd) and I think you aren't doing that. BTW Further down in the script you have another place to edit: # now get patients and start calculating file counts and sizes # EDIT BELOW: change the name of the file to october to do October open (PATIENTS, "september.csv") or die $!; #open (PATIENTS, "october.csv") or die $!; You might want to check those file names are correct too. -Sidney On Thu, Nov 12, 2015 at 6:50 PM, Paul Hanson wrote: > Sorry. Hopefully they are attached now. > The subdirectories should not contain unicode characters. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pmhanson at gmail.com Fri Nov 13 06:03:35 2015 From: pmhanson at gmail.com (Paul Hanson) Date: Fri, 13 Nov 2015 08:03:35 -0600 Subject: [Omaha.pm] Hello Perl Gurus In-Reply-To: References: <631B03FA-CF91-4F57-9B7F-DC48FD57EDAC@gmail.com> Message-ID: I can get screenshots, but the paths are mounted and exist. The path in the error is not the first to be processed but is the first to error. It seems to me that the script isn't handling a variable well. On Nov 13, 2015 2:50 AM, "Sidney B" wrote: > Your script says: > # EDIT BELOW: this is the root directory where the patient files are > my $patientFileRoot = "/mnt/images/patient"; > > I don't think that directory is available on your new system. You need to > locate the /images/patient directory and edit the path to it. > "mnt/" usually means you've mounted something (like a cd) and I think you > aren't doing that. > > > BTW > Further down in the script you have another place to edit: > # now get patients and start calculating file counts and sizes > # EDIT BELOW: change the name of the file to october to do October > open (PATIENTS, "september.csv") or die $!; > #open (PATIENTS, "october.csv") or die $!; > > You might want to check those file names are correct too. > > -Sidney > > On Thu, Nov 12, 2015 at 6:50 PM, Paul Hanson wrote: > >> Sorry. Hopefully they are attached now. >> The subdirectories should not contain unicode characters. >> >> > > _______________________________________________ > Omaha-pm mailing list > Omaha-pm at pm.org > http://mail.pm.org/mailman/listinfo/omaha-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ts-pm at tvortex.net Fri Nov 13 09:33:09 2015 From: ts-pm at tvortex.net (Simons, Tony) Date: Fri, 13 Nov 2015 11:33:09 -0600 Subject: [Omaha.pm] Hello Perl Gurus Message-ID: Please excuse the test message in reply to Paul's Message. I did some printf's in the code to test the output. The result Paul is seeing is only on the first record and it's happening in the first occurance of: my $firstDir = substr ($patientId... if I print the values of $patientId and $hospitalId before the substr the data appears to be correct. I also tried something since the data is numeric in nature. I tried: my $patientId = int $ids[0]; which resulted in the following as an error since it's not text. M-oM-;M-?514027 So it appears to be something that's happening with the substr and the data in the file. I see no special characters in the file itself using vi :set list I also did a dos2unix on the file to make sure it's using the right format. I have read that there are problems with perl and files in UTF-8 format. Is that a potential problem? -------------- next part -------------- An HTML attachment was scrubbed... URL: From sterling at hanenkamp.com Fri Nov 13 11:53:55 2015 From: sterling at hanenkamp.com (Sterling Hanenkamp) Date: Fri, 13 Nov 2015 19:53:55 +0000 Subject: [Omaha.pm] Hello Perl Gurus In-Reply-To: References: Message-ID: The short answer is that you are working with UTF-8 formatted files and the first record in your file contains 3 extra bytes (called the Byte Order Mark or BOM) to mark the file as Unicode. However, you are not telling Perl to treat them as UTF-8 files. You need to either: 1. Save your files in ASCII (which will probably break hospitals.csv since one of the hospital names contains a Unicode character). 2. Tell Perl to read the files as UTF-8. To do #2, you just can change the file open lines to: open (HOSPITALS, '<:utf8', "hospitals.csv") or die $!; ... open (PATIENTS, '<:utf8', "september.csv") or die $!; Another option is to use File::BOM to add BOM detection to your script. As a positive side-effect to the change suggested above, the 3-argument version of open is safer than the 2-arg version if you ever decide to use a variable name in your filenames (e.g., "$month.csv"). Perl has excellent Unicode support (better than most), but, for whatever reason, it does not have built-in BOM detection for input files. (It does detect BOM for script files it will be executing, just not for regular input files.) Cheers. On Fri, Nov 13, 2015 at 11:33 AM Simons, Tony wrote: > Please excuse the test message in reply to Paul's Message. I did some > printf's in the code to test the output. The result Paul is seeing is only > on the first record and it's happening in the first occurance of: > > my $firstDir = substr ($patientId... > > if I print the values of $patientId and $hospitalId before the substr the > data appears to be correct. > > I also tried something since the data is numeric in nature. I tried: > my $patientId = int $ids[0]; > > which resulted in the following as an error since it's not text. > > M-oM-;M-?514027 > > So it appears to be something that's happening with the substr and the > data in the file. I see no special characters in the file itself using vi > :set list I also did a dos2unix on the file to make sure it's using the > right format. I have read that there are problems with perl and files in > UTF-8 format. Is that a potential problem? > _______________________________________________ > Omaha-pm mailing list > Omaha-pm at pm.org > http://mail.pm.org/mailman/listinfo/omaha-pm -- Sterling Hanenkamp http://sterling.hanenkamp.com/stfl/ 785-370-4454 -------------- next part -------------- An HTML attachment was scrubbed... URL: