in reply to Re^2: Building a dynamic array or some other method?
in thread Building a dynamic array or some other method?
I'm not sure what it is that you're doing which has resulted in abnormal operation but here it is as an SSCCE.
#!/usr/bin/env perl use strict; use warnings; use Text::CSV_XS; my $csv = Text::CSV_XS->new; my $line = '10.15.106.71,"/ifs/PH01/PH01SUB/ENTNASIS02/PH02/SMB/Share/Share6/Em +ployee-Share/Contracts/Privacy and Disclosure/Disclosure Unit/Active +Contracts/County/Sample County/E00526, E00595 Sample County DA/2017- +2020 M4385566/Emails & Correspondence/Welcome Letter.doc",FMRWX,Creat +or Owner,\ifs\PH01\PH01SUB\ENTNASIS02\PH02\SMB\Share\Share6\Employee- +Share\Contracts,This folder only,Abstract\Creator Owner,"US PII (1/1) +,Document Passwords - 2.0 (1/1),US Social Security Number (1/1),GLBA +(Gramm-Leach Bliley Act) (1/1)","Credentials (1),Financial (1),PII (2 +)",4'; $csv->parse ($line); my @fields = $csv->fields; print "Input:\n$line\n\nOutput:\n" . join "\n\n", @fields;
This outputs the parsed fields separated by empty lines so it should be trivial to see what is contained in each field. The quote characters are honoured as expected. HTH.
🦛
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Building a dynamic array or some other method?
by CAdood (Acolyte) on May 03, 2024 at 21:36 UTC |